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
AlternativeStunSystem v1.1.w3x
Variables
Test Map Triggers - Do not paste
Msg
Test Trigger
AlternativeStunSystem v1.1
READ ME
----------------
Init
RunStun
StunStart
StunEnd
Entrez le code script personnalisé spécifique à la carte ci-dessous. Ce texte sera inclus dans le script de la carte après que les variables auront été déclarées et avant tout code de déclencheur.
Name
Type
is_array
initial_value
ASS_Eff
string
No
ASS_EffAtt
string
No
ASS_Group
group
No
ASS_Hash
hashtable
No
TempInt
integer
No
TempReal
real
No
TempUnit
unit
No
Msg
Events
Time - Elapsed game time is 1.00 seconds
Conditions
Actions
Game - Display to (All players) for 3600.00 seconds the text: AlternativeStunSystem v1.0 by VladadammWrite "-stun X" to stun the selected units for X seconds.Don't forget to replace X by an integer !
Test Trigger
Events
Player - Player 1 (Red) types a chat message containing -stun (Unexpected type: 'stringnoformat') as A substring
Conditions
Actions
Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Actions)
Loop - Actions
Set Variable Set TempReal = (Real((Substring((Entered chat string), 7, (Length of (Entered chat string))))))
Set Variable Set TempUnit = (Picked unit)
Trigger - Run StunStart <gen> (checking conditions)
---------------------------------------------------------------------------------------------
|- ALTERNATIVE STUN SYSTEM v1.1 --- By Vladadamm -|
---------------------------------------------------------------------------------------------
- Copy the folder "AlternativeStunSystem v1.1"
- Open your map and go to "File -> Preferences" (don't close world editor)
- Check if "Automatically create unknown variables while pasting data" is marked, if it's not, mark it.
- Paste the folder in the Trigger Editor.
- Give Credits to Vladadamm.
---------------------------
|- 2. How to use -|
---------------------------
- Copy all actions from RunStun (the disabled trigger).
- Paste them in your trigger, where you want to stun th.
- Set TempReal to the Stun Duration and TempUnit by the stunned unit.
- You can also change the stun special effect and its attachement point by setting ASSEff and ASSEffAtt in your trigger.
- You can replace the Temp variables by your own Temp variables.
If you have any questions or found a bug, contact me on the Clan SliD's website or on the hiveworkshop.
Init
Events
Map initialization
Conditions
Actions
-------- Add this in your actual initialization trigger. --------
Hashtable - Create a hashtable
Set Variable Set ASS_Hash = (Last created hashtable)
Set Variable Set ASS_Eff = "Abilities\Spells\Human\Thunderclap\ThunderclapTarget.mdl"
Set Variable Set ASS_EffAtt = "overhead"
RunStun
Events
Conditions
Actions
-------- Set those 2variables with wanted values (stun duration and stunned unit). --------
Set Variable Set TempReal = "0.00"
Set Variable Set TempUnit = No unit
-------- Set this one to the desired special stun effect (if you want the normal stun effect, don't add it in your trigger) + its attachement point. --------
Set Variable Set ASS_Eff = "Abilities\Spells\Human\Thunderclap\ThunderclapTarget.mdl"
Set Variable Set ASS_EffAtt = "overhead"
-------- You can change this action for the checking/ignoring conditions if you want. --------
Trigger - Run StunStart <gen> (checking conditions)
StunStart
Events
Conditions
Actions
Custom script: set udg_TempInt = GetHandleId(udg_TempUnit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TempUnit is in ASS_Group.) Equal to False
Then - Actions
Unit - Pause TempUnit
Unit Group - Add TempUnit to ASS_Group
Hashtable - Save TempReal as 0 of TempInt in ASS_Hash .
Special Effect - Create a special effect attached to the ASS_EffAtt of TempUnit using ASS_Eff
Hashtable - Save Handle Of (Last created special effect) as 1 of TempInt in ASS_Hash .
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(StunEnd <gen> is on) Equal to False
Then - Actions
Trigger - Turn on StunEnd <gen>
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
TempReal Greater than (Load 0 of TempInt from ASS_Hash.)
Then - Actions
Hashtable - Save TempReal as 0 of TempInt in ASS_Hash .
Special Effect - Destroy (Load 1 of TempInt in ASS_Hash.)
Special Effect - Create a special effect attached to the ASS_EffAtt of TempUnit using ASS_Eff
Hashtable - Save Handle Of (Last created special effect) as 1 of TempInt in ASS_Hash .
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
ASS_Eff Not equal to Abilities\Spells\Human\Thunderclap\ThunderclapTarget.mdl
Then - Actions
Set Variable Set ASS_Eff = "Abilities\Spells\Human\Thunderclap\ThunderclapTarget.mdl"
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
ASS_EffAtt Not equal to overhead
Then - Actions
Set Variable Set ASS_EffAtt = "overhead"
Else - Actions
StunEnd
Events
Time - Every 0.05 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in ASS_Group and do (Actions)
Loop - Actions
Set Variable Set TempUnit = (Picked unit)
Custom script: set udg_TempInt = GetHandleId(udg_TempUnit)
Hashtable - Save ((Load 0 of TempInt from ASS_Hash.) - 0.05) as 0 of TempInt in ASS_Hash .
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Load 0 of TempInt from ASS_Hash.) Less than or equal to 0.00
(TempUnit is dead) Equal to True
Then - Actions
Unit - Unpause TempUnit
Special Effect - Destroy (Load 1 of TempInt in ASS_Hash.)
Unit Group - Remove TempUnit from ASS_Group .
Hashtable - Clear all child hashtables of child TempInt in ASS_Hash .
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
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.