Chaosy
Tutorial Reviewer
- Joined
- Jun 9, 2011
- Messages
- 13,183
'Ello.
I just bought HotS to try out the editor in SC II once more. Gotta say I love some of the features. Anyway, I have created two systems which are MUI and seems to work with my limited testing.
I have nice knowledge in wc3 which is why I want to know the differences.
1. Do we need to null locals?
2. Do we need to remove point variables after usage?
I am open for general improvements, though do not be too harsh as this is merely training and nothing serious as of yet xD
I just bought HotS to try out the editor in SC II once more. Gotta say I love some of the features. Anyway, I have created two systems which are MUI and seems to work with my limited testing.
I have nice knowledge in wc3 which is why I want to know the differences.
1. Do we need to null locals?
2. Do we need to remove point variables after usage?
I am open for general improvements, though do not be too harsh as this is merely training and nothing serious as of yet xD
-
Enters Map
-
Events
- Unit - Any Unit Enters (Entire map)
- Local Variables
-
Conditions
- ((Unit type of (Triggering unit)) is Missile) != True
-
Actions
- Unit - Set (Triggering unit) custom value custom value channel to number of indexes
- Variable - Set indexed Units[number of indexes] = (Triggering unit)
- Variable - Set number of indexes = (number of indexes + 1)
-
Events
-
Dies
-
Events
- Unit - Any Unit dies
- Unit - Any Unit Leaves (Entire map)
-
Local Variables
- i = 0 <Integer>
- Conditions
-
Actions
-
General - For each integer i from (Integer((Custom value 0 of (Triggering unit)))) to (number of indexes - 1) with increment 1, do (Actions)
-
Actions
- Variable - Set indexed Units[i] = indexed Units[(i + 1)]
- Unit - Set indexed Units[i] custom value custom value channel to i
-
Actions
- Variable - Set number of indexes = (number of indexes - 1)
-
General - For each integer i from (Integer((Custom value 0 of (Triggering unit)))) to (number of indexes - 1) with increment 1, do (Actions)
-
Events
-
Test
-
Events
- UI - Player Any Player presses Space key Down with shift Allow, control Allow, alt Allow
-
Local Variables
- i = 0 <Integer>
- Conditions
-
Actions
-
General - For each integer i from 0 to (number of indexes - 1) with increment 1, do (Actions)
-
Actions
- Debug - Display ("Indexed: " + ((Name of (Unit type of indexed Units[i])) + (Text((Custom value 0 of indexed Units[i])) with Any Precision decimal places))) as debug output using Type 01, and Do display it in the game window
-
Actions
-
General - For each integer i from 0 to (number of indexes - 1) with increment 1, do (Actions)
-
Events
-
Apply
- Events
-
Local Variables
- id = (Integer((Custom value custom value channel of Target))) <Integer>
- Conditions
-
Actions
- Variable - Set Destination[id] = Loc
-
General - If (Conditions) then do (Actions) else do (Actions)
-
If
- (All units in Group are dead) == True
-
Then
- Trigger - Turn Loop On
- Else
-
If
- Unit Group - Add Target to Group
-
Loop
-
Events
- Timer - Every 0.1 seconds of Game Time
-
Local Variables
- u = No Unit <Unit>
- id = 0 <Integer>
- p = No Point <Point>
- p2 = No Point <Point>
- Conditions
-
Actions
-
Unit Group - Pick each unit in Group and do (Actions)
-
Actions
- Variable - Set u = (Picked unit)
- Variable - Set id = (Integer((Custom value custom value channel of u)))
- Variable - Set p = (Position of u)
- Variable - Set Angle = (Angle from p to Destination[id])
- Variable - Set p2 = (p offset by Speed towards Angle degrees)
- Unit - Move u instantly to p2 (Blend)
-
General - If (Conditions) then do (Actions) else do (Actions)
-
If
- (Distance between p2 and Destination[id]) <= 0.75
-
Then
- Unit Group - Remove u from Group
-
General - If (Conditions) then do (Actions) else do (Actions)
-
If
- (All units in Group are dead) == True
-
Then
- Trigger - Turn Loop Off
- Else
-
If
- Else
-
If
-
Actions
-
Unit Group - Pick each unit in Group and do (Actions)
-
Events
-
Demo
-
Events
- Unit - Any Unit takes Non-Fatal Any damage (from Any effects)
- Local Variables
- Conditions
-
Actions
- Variable - Set Target = (Triggering unit)
- Variable - Set Loc = ((Position of Target) offset by 2.5 towards (Facing of (Damaging unit)) degrees)
- Trigger - Run Apply (Ignore Conditions, Don't Wait until it finishes)
-
Events