• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Stop [v1.1]

  • Like
Reactions: Thanathos
Spell Description

Active Ability
Spell Type: Point Target
Cast Range: 600 range
Kal creates a time rune that rotates at a target point. The time rune rotates slower as time passes until it stop, pausing any units except the caster that within the rune for a duration.
Level 1: 3 seconds
Level 2: 4 seconds
Level 3: 5 seconds

[trigger=Stop cast]Stop cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Stop
Actions
-------- ===== Hanky's dynamic indexing system ===== --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
S_index_size Equal to 0
Then - Actions
Trigger - Turn on Stop loop <gen>
Else - Actions
Set S_index_size = (S_index_size + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
S_index_size Greater than S_index_max
Then - Actions
Set S_index1[S_index_size] = S_index_size
Set S_index_max = S_index_size
Else - Actions
Set S_index2 = S_index1[S_index_size]
-------- ======================================================== --------
-------- ===== to check whether the dummy (time rune) has stop rotating ===== --------
Set S_pause[S_index2] = False
-------- ===== reset the count of stopping time and initial speed of dummy (time rune) ===== --------
Set S_stopduration[S_index2] = 0.00
Set S_speed[S_index2] = 100.00
-------- ===== setting the caster ===== --------
Set S_caster[S_index2] = (Triggering unit)
-------- ===== duration of stop time ===== --------
Set S_stopduration[S_index2] = (2.00 + (Real((Level of Stop for S_caster[S_index2]))))
-------- ===== setting in the target area ===== --------
Set S_targetpoint = (Target point of ability being cast)
-------- ===== create the dummy (time rune) ===== --------
Unit - Create 1 stop_dummy for (Triggering player) at S_targetpoint facing Default building facing degrees
-------- ===== saving the dummy (time rune) into variable ===== --------
Set S_dummy[S_index2] = (Last created unit)
-------- ===== create a group to save all units that has been stop so that can be unstop them later ===== --------
Custom script: set udg_S_stopgroup[udg_S_index2] = CreateGroup()
-------- ===== clearing point leaks ===== --------
Custom script: call RemoveLocation (udg_S_targetpoint)
[/trigger]
[trigger=Stop loop]Stop loop
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
For each (Integer S_index3) from 1 to S_index_size, do (Actions)
Loop - Actions
Set S_index2 = S_index1[S_index3]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
S_speed[S_index2] Greater than 0.00
Then - Actions
-------- ===== reduce the speed of the dummy (time rune) if the speed of the dummy is more than 0 ===== --------
Set S_speed[S_index2] = (S_speed[S_index2] - 1.50)
Animation - Change S_dummy[S_index2]'s animation speed to S_speed[S_index2]% of its original speed
Else - Actions
-------- ===== change the colour of the dummy (time rune) to red when stop ===== --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
S_pause[S_index2] Equal to False
Then - Actions
Set S_pause[S_index2] = True
Unit - Pause S_dummy[S_index2]
Animation - Change S_dummy[S_index2]'s vertex coloring to (100.00%, 0.00%, 0.00%) with 0.00% transparency
Else - Actions
-------- ===== check the position of dummy (time rune) to stop all units in the area ===== --------
Set S_dummypoint = (Position of S_dummy[S_index2])
-------- ===== check the duration ===== --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
S_stopduration[S_index2] Greater than 0.00
Then - Actions
Set S_stopduration[S_index2] = (S_stopduration[S_index2] - 0.03)
-------- ===== auto-destroy group function ===== --------
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units within 400.00 of S_dummypoint matching ((((Matching unit) is alive) Equal to True) and ((((Matching unit) is paused) Equal to False) and ((Matching unit) Not equal to S_caster[S_index2])))) and do (Actions)
Loop - Actions
-------- ===== add all units in the time stop except the caster into the stop group and pause them ===== --------
Unit Group - Add (Picked unit) to S_stopgroup[S_index2]
Animation - Change (Picked unit)'s animation speed to 0.00% of its original speed
Unit - Pause (Picked unit)
Else - Actions
-------- ===== kill the unit when spell over ===== --------
Unit - Explode S_dummy[S_index2]
-------- ===== unpause all the units in the group ===== --------
Unit Group - Pick every unit in S_stopgroup[S_index2] and do (Actions)
Loop - Actions
Animation - Change (Picked unit)'s animation speed to 100.00% of its original speed
Unit - Unpause (Picked unit)
Unit Group - Remove (Picked unit) from S_stopgroup[S_index2]
-------- ===== clearing leak group ===== --------
Custom script: call DestroyGroup (udg_S_stopgroup[udg_S_index2])
-------- ======================================================== --------
Set S_index1[S_index3] = S_index1[S_index_size]
Set S_index1[S_index_size] = S_index2
Set S_index_size = (S_index_size - 1)
Set S_index3 = (S_index3 - 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
S_index_size Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
-------- ===== clearing leak point ===== --------
Custom script: call RemoveLocation (udg_S_dummypoint)
[/trigger]


Changelog

v1.1
- added locust to the dummy
- used (Triggering Player) instead of (Owner of S_caster[S_Index2])
- fixed a problem with the setting of level of ability
- used only one variable to count the duration instead of two variables
- unticked the "Disables Other abilities"
- used "Blizzard" as the Base Order ID
- moved
  • Custom script: call RemoveLocation (udg_S_dummypoint)
out of If/Then/Else block

v1.0
- Spell released
Please rate and feel free to comment/critic

Credits

Thanks to Matilda_Knights for the model of the time rune [Time Rune]
Thanks to Hanky for his dynamic indexing system
Keywords:
Jay the Editor, Stop
Contents

Stop [v1.1] (Map)

Reviews
19:25, 20th Aug 2011 Pharaoh_: The spell seems to be MUI. • Add locust to the rune circle. • The "speed" is not really configurable. You should add a value, which you will be subtracting 0.03 from, just like the "stopcount" variable. • Use...

Moderator

M

Moderator

19:25, 20th Aug 2011
Pharaoh_: The spell seems to be MUI.
• Add locust to the rune circle.
• The "speed" is not really configurable. You should add a value, which you will be subtracting 0.03 from, just like the "stopcount" variable.
• Use (Triggering player) instead of (Owner of S_caster[S_Index2]).
  • Set S_stopmax[S_index2] = (2.00 + (Real((Level of Unknown (A000) for S_caster[S_index2]))))
reset the ability.
• You don't need S_stopmax; just use S_stopcount with the value of S_stopmax and subtract 0.03 in the looping trigger.
  • Custom script: call RemoveLocation (udg_S_dummypoint)
Move this out of the if/then/else block.
• Untick the "Disables Other abilities" and use a Base Order ID (in case other spells are made out of Channel on the same hero).
You can also use "Targeting image" and set an AoE value for the sake of the visuals.

• I really liked the effect

Edit: Important changes have been made; resource approved with a rating of 4/5 (Recommended).
 
Pausing a unit is indeed problematic, concerning the orders' queue and the fact that it clears the abilities' inventory. I discourage its use in systems that force units to fly. However, in spells/systems that "pause" time, I find it the most possible way (another way would involve 2 abilities). If you have a workaround of your own, feel free to submit it :)
 
Level 1
Joined
Aug 21, 2011
Messages
1
It's a little hard for me to get how you made the variable integer to be -None- cuz it doesn't allow me to do it like that and so the stop time trigger doesn't work. How do you do it ?
 
Last edited:
Level 12
Joined
Aug 12, 2008
Messages
350
korusas, hmm? I don't get what you mean. If the trigger doesn't work, just copy the folder of the spells and paste it onto your map. Just remember to make sure that the "Automatically create unknown variables while pasting trigger data" is ticked. It's located in "File ----> Preferences ----> Automatically create unknown variables while pasting trigger data".
 
Top