- Joined
- Jul 19, 2007
- Messages
- 824
+SOLVED+
I got a problem with one of my triggered spells and can't see why it crashes sometimes. It's meant to give the casting Hero and all other friendly Heroes in the map an invulnerability for a short period of time after the Hero has casted the spell sometimes it gives the invulnerability like it should and sometimes it ignores it, why does it happening?
The triggers of the spell.
I got a problem with one of my triggered spells and can't see why it crashes sometimes. It's meant to give the casting Hero and all other friendly Heroes in the map an invulnerability for a short period of time after the Hero has casted the spell sometimes it gives the invulnerability like it should and sometimes it ignores it, why does it happening?
The triggers of the spell.
-
Divine Light Cast
-
Events
- Unit - A unit Finishes casting an ability
-
Conditions
- (Ability being cast) Equal to Divine Light
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- DivineLightIndex Equal to 0
-
Then - Actions
- Trigger - Turn on Divine Light Loop <gen>
- Else - Actions
-
If - Conditions
- Custom script: set bj_wantDestroyGroup = true
-
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) is A Hero) Equal to True
- ((Picked unit) belongs to an ally of (Triggering player)) Equal to True
-
Then - Actions
- Set DivineLightIndex = (DivineLightIndex + 1)
- Set DivineLightUnit[DivineLightIndex] = (Picked unit)
- Set DivineLightDur[DivineLightIndex] = (0.00 + (2.00 x (Real((Level of Divine Light for (Triggering unit))))))
- Unit - Add Invulnerable (Divine Light) to DivineLightUnit[DivineLightIndex]
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Divine Light Loop
-
Events
- Time - Every 0.25 seconds of game time
- Conditions
-
Actions
-
For each (Integer DivineLightLoop) from 1 to DivineLightIndex, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- DivineLightDur[DivineLightLoop] Less than or equal to 0.00
-
Then - Actions
- Unit - Remove Invulnerable (Divine Light) from DivineLightUnit[DivineLightLoop]
- Set DivineLightDur[DivineLightLoop] = DivineLightDur[DivineLightIndex]
- Set DivineLightUnit[DivineLightLoop] = DivineLightUnit[DivineLightIndex]
- Set DivineLightIndex = (DivineLightIndex - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- DivineLightIndex Equal to 0
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
Else - Actions
- Set DivineLightDur[DivineLightLoop] = (DivineLightDur[DivineLightLoop] - 0.25)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
For each (Integer DivineLightLoop) from 1 to DivineLightIndex, do (Actions)
-
Events
Last edited: