- Joined
- Aug 20, 2009
- Messages
- 95
Okay, in my spell-pack I'm using Custom Value of units as a way to determine which dummy units belong to which unit. When I try to select a unit to move it (It's locusted) it does not select the unit. I do a random unit from the CirclingUnits[Custom value of (Triggering unit)] and I know it's not empty, it ALWAYS returns null. Heres the map.
The triggers are a lot longer.
The triggers are a lot longer.
-
SenseOfTheSouls
-
Events
- Unit - A unit Dies
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Caster_Value Greater than or equal to 5000
-
Then - Actions
- Set Caster_Value = 0
-
Else - Actions
- Set Caster_Value = (Caster_Value + 1)
-
If - Conditions
- Set Deadunit[Caster_Value] = (Triggering unit)
- Set Deadunitloc = (Position of Deadunit[Caster_Value])
- Set MaxRange = 2000.00
- Set SoulCaster = (Units within MaxRange of Deadunitloc matching ((Level of Sense of the Souls for (Matching unit)) Greater than 0))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in SoulCaster) Greater than 1
-
Then - Actions
-
Unit Group - Pick every unit in SoulCaster and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Number of units in SoulCaster) Equal to 0) or ((Number of units in Circling_Units[(Custom value of (Picked unit))]) Greater than or equal to (10 + ((Level of Sense of the Souls for (Picked unit)) x 5)))
- Then - Actions
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) is in SoS_Casters) Equal to False
-
Then - Actions
- Unit Group - Add (Picked unit) to SoS_Casters
- Unit - Set the custom value of (Picked unit) to CustomValue
- Set CustomValue = (CustomValue + 1)
- Else - Actions
-
If - Conditions
- Set SoulMaster[Caster_Value] = (Picked unit)
- Set SoulMasterLoc = (Position of SoulMaster[Caster_Value])
- -------- Angle to move from Deadunitloc to Soulmaster --------
- Set Angle[Caster_Value] = (Angle from Deadunitloc to (Position of (Picked unit)))
- -------- --------------------------------------------- --------
- Unit - Create 1 DUMMY_UNIT for (Owner of (Picked unit)) at Deadunitloc facing Angle[Caster_Value] degrees
- Set Dummyunit[Caster_Value] = (Last created unit)
- Unit - Set the custom value of Dummyunit[Caster_Value] to (Custom value of (Picked unit))
- Animation - Change Dummyunit[Caster_Value] flying height to (Random real number between 100.00 and 300.00) at 100.00
- Unit Group - Add Dummyunit[Caster_Value] to Dummyunits
- Custom script: call RemoveLocation(udg_SoulMasterLoc)
- Set Caster_Value = (Caster_Value + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in SoulCaster and do (Actions)
-
Else - Actions
-
Unit Group - Pick every unit in SoulCaster and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Number of units in SoulCaster) Equal to 0) or ((Number of units in Circling_Units[(Custom value of (Picked unit))]) Greater than or equal to (10 + ((Level of Sense of the Souls for (Picked unit)) x 5)))
- Then - Actions
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) is in SoS_Casters) Equal to False
-
Then - Actions
- Unit Group - Add (Picked unit) to SoS_Casters
- Unit - Set the custom value of (Picked unit) to CustomValue
- Set CustomValue = (CustomValue + 1)
- Else - Actions
-
If - Conditions
- Set SoulMaster[Caster_Value] = (Picked unit)
- Set SoulMasterLoc = (Position of (Picked unit))
- -------- Angle to move from Deadunitloc to Soulmaster --------
- Set Angle[Caster_Value] = (Angle from Deadunitloc to (Position of (Picked unit)))
- -------- --------------------------------------------- --------
- Unit - Create 1 DUMMY_UNIT for (Owner of (Picked unit)) at Deadunitloc facing Angle[Caster_Value] degrees
- Set Dummyunit[Caster_Value] = (Last created unit)
- Unit - Set the custom value of Dummyunit[Caster_Value] to (Custom value of (Picked unit))
- Animation - Change Dummyunit[Caster_Value] flying height to (Random real number between 100.00 and 300.00) at 100.00
- Unit Group - Add Dummyunit[Caster_Value] to Dummyunits
- Custom script: call RemoveLocation(udg_SoulMasterLoc)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Unit Group - Pick every unit in SoulCaster and do (Actions)
-
If - Conditions
- Custom script: call RemoveLocation(udg_Deadunitloc)
- Custom script: call DestroyGroup(udg_SoulCaster)
- Trigger - Turn on SoS Loop <gen>
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
SoS Loop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
For each (Integer A) from 0 to Caster_Value, do (Actions)
-
Loop - Actions
- Set SoulMasterLoc = (Position of SoulMaster[(Integer A)])
- Set Dummyloc = (Position of Dummyunit[(Integer A)])
- Set Angle[(Integer A)] = (Angle from Dummyloc to SoulMasterLoc)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Distance between Dummyloc and SoulMasterLoc) Less than or equal to 200.00) and ((Dummyunit[(Integer A)] is in Circling_Units[(Custom value of SoulMaster[(Integer A)])]) Equal to False)
-
Then - Actions
- Unit Group - Remove Dummyunit[(Integer A)] from Dummyunits
- Unit Group - Add Dummyunit[(Integer A)] to Circling_Units[(Custom value of SoulMaster[(Integer A)])]
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Dummyunit[(Integer A)] is in Circling_Units[(Custom value of SoulMaster[(Integer A)])]) Equal to True
-
Then - Actions
- Custom script: call RemoveLocation(udg_Offset)
- Set CirclingAngle[(Integer A)] = (CirclingAngle[(Integer A)] + 3.50)
- Set Offset = (SoulMasterLoc offset by 200.00 towards CirclingAngle[(Integer A)] degrees)
- Unit - Move Dummyunit[(Integer A)] instantly to Offset
-
Else - Actions
- Set Offset = (Dummyloc offset by 20.00 towards Angle[(Integer A)] degrees)
- Unit - Move Dummyunit[(Integer A)] instantly to Offset
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Custom script: call RemoveLocation(udg_SoulMasterLoc)
- Custom script: call RemoveLocation(udg_Offset)
- Custom script: call RemoveLocation(udg_Dummyloc)
-
Loop - Actions
-
For each (Integer A) from 0 to Caster_Value, do (Actions)
-
Events
-
SSLearn
-
Events
- Unit - A unit Learns a skill
-
Conditions
- (Learned Hero Skill) Equal to Sense of the Souls
-
Actions
- Unit - Add Send Soul to (Triggering unit)
- Unit - Set level of Send Soul for (Triggering unit) to (Level of Sense of the Souls for (Triggering unit))
-
Events
-
SSCast
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Send Soul
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Circling_Units[(Custom value of (Triggering unit))] is empty) Equal to True
-
Then - Actions
- Skip remaining actions
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- SS_Integer Greater than or equal to 2999
-
Then - Actions
- Set SS_Integer = 0
-
Else - Actions
- Set SS_Integer = (SS_Integer + 1)
-
If - Conditions
- Set SS_Caster[SS_Integer] = (Triggering unit)
- Set SS_Target[SS_Integer] = (Target unit of ability being cast)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (SS_Target[SS_Integer] is in SS_NO_DAMAGE) Equal to True
-
Then - Actions
- Unit Group - Remove SS_Target[SS_Integer] from SS_NO_DAMAGE
- Else - Actions
-
If - Conditions
- Set SS_Damage[SS_Integer] = (10.00 + (10.00 x (Real((Level of (Ability being cast) for (Triggering unit))))))
- Set SoS_Casters = (Units owned by (Owner of (Triggering unit)) matching ((Custom value of (Matching unit)) Not equal to (Custom value of (Triggering unit))))
- Set SS_Dummy[SS_Integer] = (Random unit from SoS_Casters)
- Unit Group - Remove SS_Dummy[SS_Integer] from Circling_Units[(Custom value of (Triggering unit))]
- Game - Display to (All players) the text: (String((Unit-type of SS_Dummy[SS_Integer])))
- Trigger - Turn on SSLoop <gen>
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
SSLoop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
For each (Integer A) from 0 to SS_Integer, do (Actions)
-
Loop - Actions
- Set SS_Dummyloc = (Position of SS_Dummy[(Integer A)])
- Set SS_TargetLoc = (Position of SS_Target[(Integer A)])
- Set SS_Angle[(Integer A)] = (Angle from SS_Dummyloc to SS_TargetLoc)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Distance between SS_Dummyloc and SS_TargetLoc) Less than or equal to 80.00) and ((SS_Target[(Integer A)] is in SS_NO_DAMAGE) Equal to False)
-
Then - Actions
- Custom script: call RemoveLocation(udg_SS_Dummyloc)
- Custom script: call RemoveLocation(udg_SS_TargetLoc)
- Game - Display to (All players) the text: Damaging
- Unit - Cause SS_Caster[(Integer A)] to damage SS_Target[(Integer A)], dealing SS_Damage[(Integer A)] damage of attack type Spells and damage type Normal
- Unit - Remove SS_Dummy[(Integer A)] from the game
- Unit Group - Add SS_Target[(Integer A)] to SS_NO_DAMAGE
-
Else - Actions
- Set SS_Dummyloc = (Position of SS_Dummy[(Integer A)])
- Set SS_TargetLoc = (Position of SS_Target[(Integer A)])
- Set SS_Offset = (Dummyloc offset by 20.00 towards Angle[(Integer A)] degrees)
- Unit - Move SS_Dummy[(Integer A)] instantly to SS_Offset, facing Angle[(Integer A)] degrees
- Game - Display to (All players) the text: Moving
- Custom script: call RemoveLocation(udg_SS_Dummyloc)
- Custom script: call RemoveLocation(udg_SS_TargetLoc)
- Custom script: call RemoveLocation(udg_SS_Offset)
-
If - Conditions
-
Loop - Actions
-
For each (Integer A) from 0 to SS_Integer, do (Actions)
-
Events