Marsmallos
Member
- Reaction score
- 17
Hello!
I am creating a trigger and I'm getting what seems like a really annoying bug. Could somebody take a look at it and help me figure out what's wrong/how to solve it? (more detailed description below)
For some reason its a single spellcasting action that breaks the trigger:
If this action is enabled, the game seems to forget about what/where GEN_TEMP_POINT[1] is and thus it doesn't put any units into GEN_TEMP_GROUP_single (but Death and Decay is successfully cast I might add), and if I disable it, it creates the dummies, runs the loop and does the stun just fine. In other words, if the Death and Decay action is disabled everything else in the trigger runs perfectly, and if its enabled the game doesn't run the unit group loop (nor create the second dummy caster, whose creation is dependant on the loop). Wtf?
I am creating a trigger and I'm getting what seems like a really annoying bug. Could somebody take a look at it and help me figure out what's wrong/how to solve it? (more detailed description below)
Trigger:
- Freezing Trap freeze
- Events
- Unit - A unit Dies
- Conditions
- (Unit-type of (Triggering unit)) Equal to Freezing Trap
- Actions
- Game - Display to (All players) the text: Debug: Mine exploded
- -------- create the AoE effect and slow --------
- Set GEN_TEMP_POINT[1] = (Position of (Triggering unit))
- Unit - Create 1 Dummy Caster for (Owner of (Triggering unit)) at GEN_TEMP_POINT[1] facing Default building facing degrees
- Unit - Add a 15.00 second Generic expiration timer to (Last created unit)
- Unit - Add (Hunter) Freezing trap slow to (Last created unit)
- Unit - Add (Hunter) Freezing trap visual effect to (Last created unit)
- Unit - Order (Last created unit) to Undead Lich - Death And Decay GEN_TEMP_POINT[1]
- -------- loop through all nearby units to find the closest one --------
- Set GEN_TEMP_GROUP_single = (Units within 500.00 of GEN_TEMP_POINT[1] matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
- Set HHUNTER_Trap_distance = 500.00
- Game - Display to (All players) the text: Debug: Does this pa...
- Game - Display to (All players) the text: (String((Number of units in GEN_TEMP_GROUP_single)))
- Game - Display to (All players) the text: (String(HHUNTER_Trap_distance))
- Unit Group - Pick every unit in GEN_TEMP_GROUP_single and do (Actions)
- Loop - Actions
- Game - Display to (All players) the text: Debug: loop
- Set GEN_TEMP_POINT[2] = (Position of (Picked unit))
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Distance between GEN_TEMP_POINT[1] and GEN_TEMP_POINT[2]) Less than or equal to HHUNTER_Trap_distance
- Then - Actions
- Set HHUNTER_Trap_freezetarget = (Picked unit)
- Set HHUNTER_Trap_distance = (Distance between GEN_TEMP_POINT[1] and GEN_TEMP_POINT[2])
- Else - Actions
- If - Conditions
- Custom script: call RemoveLocation(udg_GEN_TEMP_POINT[2])
- Loop - Actions
- -------- create another dummy to stun the closest target --------
- Set GEN_TEMP_POINT_single = (Position of HHUNTER_Trap_freezetarget)
- Unit - Create 1 Dummy Caster for (Owner of (Triggering unit)) at GEN_TEMP_POINT_single facing Default building facing degrees
- Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
- Unit - Add (Hunter) Freezing Trap stun to (Last created unit)
- Unit - Order (Last created unit) to Human Mountain King - Storm Bolt HHUNTER_Trap_freezetarget
- Game - Display to (All players) the text: Debug: Does this pa...
- Custom script: call DestroyGroup(udg_GEN_TEMP_GROUP_single)
- Custom script: call RemoveLocation(udg_GEN_TEMP_POINT_single)
- Custom script: call RemoveLocation(udg_GEN_TEMP_POINT[1])
- Events
For some reason its a single spellcasting action that breaks the trigger:
Trigger:
- Unit - Order (Last created unit) to Undead Lich - Death And Decay GEN_TEMP_POINT[1]
If this action is enabled, the game seems to forget about what/where GEN_TEMP_POINT[1] is and thus it doesn't put any units into GEN_TEMP_GROUP_single (but Death and Decay is successfully cast I might add), and if I disable it, it creates the dummies, runs the loop and does the stun just fine. In other words, if the Death and Decay action is disabled everything else in the trigger runs perfectly, and if its enabled the game doesn't run the unit group loop (nor create the second dummy caster, whose creation is dependant on the loop). Wtf?