Igor_Z
You can change this now in User CP.
- Reaction score
- 61
I got a problem with the triggers for the Chain Frost spell. Can you tell me what is wrong with them. When my hero casts the spell it instantly kills the Bouncing Glaive which means there is something wrong with the second if/then/else action in my second trigger. Thank you for your time
Triggers:
Triggers:
Trigger:
- Bouncing Glaive Cast
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to Bouncing Glaive
- Actions
- -------- set up variables --------
- Set BG_Caster = (Triggering unit)
- Set BG_Target = (Target unit of ability being cast)
- Set BG_Speed = 50.00
- Set BG_Level = (Level of Bouncing Glaive for BG_Caster)
- Set BG_Loc = (Position of BG_Caster)
- Set BG_Max_Jumps = (3 + BG_Level)
- -------- creating dummy --------
- Unit - Create 1 Bouncing Glaive for (Owner of BG_Caster) at BG_Loc facing (Facing of BG_Caster) degrees
- Set BG_Glaive = (Last created unit)
- -------- add dummy ability to dummy --------
- Unit - Add Bouncing Glaive (Dummy Cast) to BG_Glaive
- Unit - Set level of Bouncing Glaive (Dummy Cast) for BG_Glaive to BG_Level
- -------- set fly height --------
- Unit - Add Crow Form to BG_Glaive
- Unit - Remove Crow Form from BG_Glaive
- Animation - Change BG_Glaive flying height to 60.00 at 0.00
- Custom script: call RemoveLocation(udg_BG_Loc)
- Trigger - Turn on Bouncing Glaive Timed <gen>
- Events
Trigger:
- Bouncing Glaive Timed
- Events
- Time - Every 0.04 seconds of game time
- Conditions
- Actions
- Set BG_Loc = (Position of BG_Glaive)
- Set BG_Loc2 = (Position of BG_Target)
- Set BG_Real = (Distance between BG_Loc and BG_Loc2)
- -------- check the distance betwen target and dummy --------
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- BG_Real Less than or equal to 50.00
- Then - Actions
- -------- check some condition: target is alive, not immune and visible => order dummy to cast FrostNova onto it. --------
- -------- or if your dummy's cast isn't fast enough and you got bug, create another dummy to cast the Frost Nova instead --------
- Unit - Create 1 Bouncing Glaive Dummy for (Owner of BG_Caster) at BG_Loc2 facing (Facing of BG_Caster) degrees
- Set BG_Dummy2 = (Last created unit)
- Unit - Add a 1.00 second Generic expiration timer to BG_Dummy2
- Unit - Add Bouncing Glaive (Dummy Cast) to BG_Dummy2
- Unit - Set level of Bouncing Glaive (Dummy Cast) for BG_Dummy2 to (Level of Bouncing Glaive (Dummy Cast) for BG_Glaive)
- Unit - Order BG_Dummy2 to Undead Lich - Frost Nova BG_Target
- -------- pick a new target --------
- Set BG_Group = (Units within 600.00 of BG_Loc2 matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is Magic Immune) Equal to False)) and (((((Matching unit) is alive) Equal to True) and ((Matching unit) Not equal to BG_Target)) and ((((Matchin
- Set BG_Target = (Random unit from BG_Group)
- Unit Group - Add BG_Target to BG_Affected
- Set BG_Num_of_Units = (Number of units in BG_Group)
- -------- decrease the number of jump --------
- Set BG_Max_Jumps = (BG_Max_Jumps - 1)
- Custom script: call DestroyGroup(udg_BG_Group)
- Else - Actions
- If - Conditions
- Custom script: call RemoveLocation(udg_BG_Loc2)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Or - Any (Conditions) are true
- Conditions
- BG_Max_Jumps Equal to 0
- BG_Target Equal to No unit
- BG_Num_of_Units Equal to 0
- Conditions
- Or - Any (Conditions) are true
- Then - Actions
- -------- stop ! --------
- Custom script: call RemoveLocation(udg_BG_Loc)
- Unit - Kill BG_Glaive
- Unit Group - Remove all units from BG_Affected
- Trigger - Turn off (This trigger)
- Skip remaining actions
- Else - Actions
- If - Conditions
- -------- move the dummy towards the target --------
- Set BG_Loc2 = (Position of BG_Target)
- Set BG_Real = (Angle from BG_Loc to BG_Loc2)
- Custom script: call RemoveLocation(udg_BG_Loc2)
- Set BG_Loc2 = (BG_Loc offset by BG_Speed towards BG_Real degrees)
- Unit - Move BG_Glaive instantly to BG_Loc2, facing BG_Real degrees
- Custom script: call RemoveLocation(udg_BG_Loc)
- Custom script: call RemoveLocation(udg_BG_Loc2)
- -------- if there is no target left or the number of jump has reached 0 --------
- Events