Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
You are using an out of date browser. It may not display this or other websites correctly. You should upgrade or use an alternative browser.
Triggers
Spasm[Spell].2.w3x
Variables
Map Only
Initialization
Kept seperate for using convenients
Spasm
!INSTRUCTIONS FOR EXPORTING!
Cast Spasm
Remove Dummy
Transparency
Instructions on importing/expotring from map.
You must copy these things from this map to your map in this order!
[From the Object Editor]
1. The custom buff.
2. The two custom spells.
3. The custom unit Slow Dummy.
[From the trigger editor]
Note: Before you do the next action make sure you are able to copy unknown variables that can be enabled in 'File -> Preferences' when on the terrain editor window.
4.The Catogory(Folder) Named Spasm.
-----------------------
Feel free to use my spell in your map, but you MUST give credits to me(DeathChef) for this spell.
Name
Type
is_array
initial_value
Addition
boolean
Yes
CastingPlayers
force
No
DummyUses
integer
No
EffectedUnits
group
Yes
IntegerSetup
integer
No
OnCheck
boolean
No
Point
location
No
Transparency
real
Yes
Initialization
Events
Map initialization
Conditions
Actions
Visibility - Disable black mask
Game - Set the time of day to 0.00
Game - Set time of day speed to 0.00 % of the default speed
Cinematic - Enable occlusion for (All players)
Cinematic - Disable boundary tinting for (All players)
Instructions on importing/expotring from map.
You must copy these things from this map to your map in this order!
[From the Object Editor]
1. The custom buff.
2. The two custom spells.
3. The custom unit Slow Dummy.
[From the Trigger Editor]
Note: Before you do the next action make sure you are able to copy unknown variables that can be enabled in 'File -> Preferences' when on the terrain editor window.
4.The Catogory(Folder) Named Spasm.
-----------------------
Feel free to use my spell in your map, but you MUST give credits to me(DeathChef) for this spell.
Due to the dummy spell(Thunder Clap) I am using for this spell
it has a .33 second (or close enough to) time to actually cast fully
the whole spell making me have resort to having to delay the whole
spell to take .33 seconds to cast the entire spell(which worker out
well in the end anyway).
Anyway for this to actualy work I needed to be able to create a
dummy unit that uses the edited spell of Thunder Clap right away
at the targeted area when you use the whole spell 'Spasm'.
Cast Spasm
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Spasm
Actions
-------- Sets up a Point so it doesn't leak --------
Set Variable Set Point = (Target point of ability being cast)
-------- Adds the casting units owner to a group that will take effect in the trigger 'Transparency' --------
Player Group - Add (Triggering player) to CastingPlayers
-------- Setting this variable up will allow more efficient and easy use for multiple uses in this strait forward trigger. --------
Set Variable Set IntegerSetup = (Player number of (Triggering player))
-------- Sets up a unit group variable for use of transparency(special effect) --------
Set Variable Set EffectedUnits[IntegerSetup] = (Units within (((Real((Level of Spasm for (Triggering unit)))) x 40.00) + 120.00) of Point matching ((Owner of (Matching unit)) Not equal to (Triggering player)).)
-------- Where the stunning effect takes place --------
Unit - Create 1 . Slow Dummy for (Triggering player) at Point facing 0.00 degrees
Unit - Set level of Spell Slow/Stun for (Last created unit) to (Level of Spasm for (Triggering unit))
Unit - Order (Last created unit) to Human Mountain King - Thunder Clap .
-------- Resets addition --------
-------- From use in the trigger 'Transparency'. --------
Set Variable Set Addition[IntegerSetup] = "true"
-------- Turns on the trigger Transparency for use(Note: Read Transparency Trigger trigger comment) --------
Trigger - Turn on Transparency <gen>
-------- Removes the set up leak --------
Custom script: call RemoveLocation(udg_Point)
-------- This will queue how many times this spell is currently being used at once. --------
Set Variable Set DummyUses = (DummyUses + 1)
Trigger - Turn on Remove_Dummy <gen>
This spell was made to be able to turn off when finished
so that when it isn't needed it won't clash and take any
efficiency when a unit finishes casting a spell.
In other words if this trigger isn't to be turned of in a
real map with lots of spell able to be used, every time
one of those spells finishes casting this spell will be
pointlessly triggering taking up meaningless processing.
Remove Dummy
Events
Unit - A unit Finishes casting an ability
Conditions
(Ability being cast) Equal to Spell Slow/Stun
Actions
Unit - Remove (Triggering unit) from the game
Set Variable Set DummyUses = (DummyUses - 1)
-------- Read Trigger Comment --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DummyUses Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
I have figured a formula out myself so that a looping trigger like this one
will not be kept on(turned off) when it is not being used for MUI triggers.
This is made for only one unit at a time for each player to have this spell available!
Don't really remember ever seeing it used by someone else.
----
It uses a basic function of when the trigger triggers a boolean
is set to False(/True).
If conditions are met with a player or unit
still being in play of using this trigger the boolean will be set to
True(/False).
If no other players/units are triggering
this trigger the boolean will be left as False(/True)
If the trigger is met as being useless it will be turned off.
In this case it will check if the set boolean is False(/True)
and if it is False(/True) the triggering trigger will be
turned off.
-----------------------------------------------------------------
Set OnCheck = False |
- |
if - Conditions |
Main Trigger conditions function |
Then - Actions |
Set OnCheck = True |
- |
If - Conditions |
OnCheck Equal to False |
Then - Actions |
Trigger - Turn off (This trigger) |
-----------------------------------------------------------------
Transparency
Events
Time - Every 0.12 seconds of game time
Conditions
Actions
Set Variable Set OnCheck = "false"
Player Group - Pick every player in CastingPlayers and do (Actions)
Loop - Actions
Set Variable Set OnCheck = "true"
Set Variable Set IntegerSetup = (Player number of (Picked player))
-------- Needs to add to itself to gain transparecy --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Addition[IntegerSetup] Equal to True
Then - Actions
Set Variable Set Transparency[IntegerSetup] = (Transparency[IntegerSetup] + 11.11)
-------- This is the next action taken when the effected units hit max transparency and from when the start changing to be visible again. --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Transparency[IntegerSetup] Equal to 111.10
Then - Actions
Set Variable Set Addition[IntegerSetup] = "false"
Set Variable Set Transparency[IntegerSetup] = (Transparency[IntegerSetup] - 11.11)
-------- This is when all the targeted units are ordered to attack random ones. --------
Unit Group - Pick every unit in EffectedUnits[IntegerSetup] and do (Actions)
Loop - Actions
Set Variable Set Point = (Position of (Picked unit))
Custom script: set bj_wantDestroyGroup = true
-------- Considering how messed up this function can be I have made it so that the effected units attack random units that arn't owned by the owner of the casting units --------
-------- Even though the effected units arn't ordered to attack the units owned by the casting unit they will still get targeted in the end. --------
Unit - Order (Picked unit) to Attack . (Random unit from (Units within 140.00 of Point matching ((Owner of (Matching unit)) Not equal to (Picked player)).))
Custom script: call RemoveLocation(udg_Point)
Else - Actions
Else - Actions
-------- When the variable 'Addition' is set to false the effected units regain thier transparency --------
Set Variable Set Transparency[IntegerSetup] = (Transparency[IntegerSetup] - 11.11)
-------- This is when the spell is finished --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Transparency[IntegerSetup] Equal to 0.00
Then - Actions
Player Group - Remove (Picked player) from CastingPlayers .
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.