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
DUFFv1.w3x
Variables
DUFF 1.0.1
Copying Variables
Importing/Exporting
DUFF Catch
DUFF Wonder
---------------------------
How to Use
Enter map-specific custom script code below. This text will be included in the map script after variables are declared and before any trigger code.
// bla
Name
Type
is_array
initial_value
DUFF_group
group
No
DUFF_index
integer
No
DUFF_IsTransformed
boolean
Yes
DUFF_loop
integer
No
DUFF_Type
unitcode
Yes
DUFF_unit
unit
Yes
tempinteger
integer
No
tempunit
unit
No
Make sure to let this be the first trigger to import.
Copying Variables
Events
Conditions
Actions
Set Variable Set DUFF_IsTransformed[0] = "false"
Set Variable Set DUFF_Type[0] = No unit-type
Set Variable Set DUFF_group = (Last created unit group)
Set Variable Set DUFF_index = "0"
Set Variable Set DUFF_loop = "0"
Set Variable Set DUFF_unit[0] = No unit
Set Variable Set tempinteger = "0"
Set Variable Set tempunit = No unit
Here's how you have my system into your map, please don't forget to credit Blizzard as well me.
1. Right-click the folder exactly named "DUFF 1.0.1" without the ""s of course.
2. Left-click Copy then load your map
3. Right-click anywhere in the area on with triggers/folders/trigger comments then left-click paste
4. Go into variable manager to double check all variables copied over right and don't lie about their type.
5. Delete the DUFF 1.0.1 folder then fix all the lied variables then re-paste the DUFF 1.0.1 folder.
6. Read the "How to Use" folder carefully.
7. Congratulate yourself on finally knowing how to properly track transformed units because this was kept in secret until now so many people weren't aware of this.
DUFF Catch
Events
Unit - A unit Begins casting an ability
Conditions
Actions
-------- Dont touch unless you know what your doing. --------
-------- This is where we identify then record the transforming unit. --------
Set Variable Set tempunit = (Triggering unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) is in DUFF_group.) Equal to True
Then - Actions
Set Variable Set tempunit = No unit
Skip remaining actions
Else - Actions
Set Variable Set DUFF_index = (DUFF_index + 1)
Set Variable Set DUFF_unit[DUFF_index] = tempunit
Set Variable Set DUFF_Type[DUFF_index] = (Unit-type of DUFF_unit[DUFF_index])
Set Variable Set DUFF_IsTransformed[DUFF_index] = "true"
Unit Group - Add DUFF_unit[DUFF_index] to DUFF_group
Set Variable Set tempunit = No unit
DUFF Wonder
Events
Unit - A unit Is issued an order targeting an object
Unit - A unit Is issued an order targeting a point
Unit - A unit Is issued an order with no target
Conditions
Actions
-------- This is where we track our transformed units. --------
Set Variable Set tempunit = (Triggering unit)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) is in DUFF_group.) Equal to False
Then - Actions
Set Variable Set tempunit = No unit
Skip remaining actions
Else - Actions
For each (Integer DUFF_loop ) from 1 to DUFF_index , do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DUFF_Type[DUFF_loop] Equal to (Unit-type of DUFF_unit[DUFF_loop])
Then - Actions
-------- Delete this line if you no longer need it. --------
Game - Display to (All players) the text: ((Name of tempunit) + has reverted!)
-------- Delete the above line if you no longer need it. --------
-------- This is where we de-index and switch over all the other index's. --------
Set Variable Set DUFF_IsTransformed[DUFF_loop] = "false"
Unit Group - Remove DUFF_unit[DUFF_loop] from DUFF_group .
Set Variable Set DUFF_Type[DUFF_loop] = DUFF_Type[DUFF_index]
Set Variable Set DUFF_Type[DUFF_index] = No unit-type
Set Variable Set DUFF_IsTransformed[DUFF_loop] = DUFF_IsTransformed[DUFF_index]
Set Variable Set DUFF_unit[DUFF_loop] = DUFF_unit[DUFF_index]
Set Variable Set DUFF_unit[DUFF_index] = No unit
Set Variable Set DUFF_index = (DUFF_index - 1)
Set Variable Set DUFF_loop = (DUFF_loop - 1)
Else - Actions
-------- Delete this line if you no longer need it. --------
Game - Display to (All players) the text: false
-------- Delete the above line if you no longer need it. --------
-------- This is where your transformed unit is detected. --------
Set Variable Set tempunit = No unit
How to Use
Events
Unit - A unit Dies
Conditions
Actions
Set Variable Set tempunit = (Dying unit)
For each (Integer tempinteger ) from 1 to DUFF_index , do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
DUFF_IsTransformed[tempinteger] Equal to True
Then - Actions
Game - Display to (All players) the text: This unit was transformed when it died.
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.