- Joined
- Sep 23, 2023
- Messages
- 9
How should I fix this spell? When I use this spell, it sometimes works normally, but sometimes it makes the game freeze.
I tried creating a new trigger to turn off the looping trigger, but it still freezes.
this skill add another skill (Spiked Carapace) to unit when have "Sanctified Reflection" buff. Take skill (Spiked Carapace) off after buff is gone.
Game is freeze sometimes. When I used another skill has looping check too. including single target skill.
Sanctified Reflection
I tried creating a new trigger to turn off the looping trigger, but it still freezes.
this skill add another skill (Spiked Carapace) to unit when have "Sanctified Reflection" buff. Take skill (Spiked Carapace) off after buff is gone.
Game is freeze sometimes. When I used another skill has looping check too. including single target skill.
Sanctified Reflection
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Sanctified Reflection
-
Actions
- Set VariableSet SR_Caster = (Triggering unit)
- Set VariableSet SR_Ability_Level = (Level of Sanctified Reflection for SR_Caster)
- -------- --------------------------- --------
- Set VariableSet SR_AOE = 300.00
- Set VariableSet SR_Location = (Target point of ability being cast)
- Set VariableSet SR_Group = (Units within SR_AOE of SR_Location matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Owner of (Matching unit)) is an ally of (Owner of SR_Caster).) Equal to True))).)
- -------- --------------------------- --------
-
Unit Group - Pick every unit in SR_Group and do (Actions)
-
Loop - Actions
- Unit Group - Add (Picked unit) to SR_Group_Buff
- Unit - Add Sanctified Reflection (Dummy) to (Picked unit)
- Unit - Set level of Sanctified Reflection (Dummy) for (Picked unit) to SR_Ability_Level
-
Loop - Actions
- -------- --------------------------- --------
- Special Effect - Create a special effect at SR_Location using Abilities\Spells\Human\Resurrect\ResurrectCaster.mdl
- Special Effect - Set Scale of (Last created special effect) to 1.50
- Special Effect - Destroy (Last created special effect)
- -------- --------------------------- --------
- Custom script: call RemoveLocation(udg_SR_Location)
- Custom script: call DestroyGroup(udg_SR_Group)
- Wait 1.00 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Guardians Retribution loop <gen> is on) Equal to False
-
Then - Actions
- Trigger - Turn on Incarcerate loop <gen>
- Else - Actions
-
If - Conditions
-
Events
- Time - Every 1.00 seconds of game time
- Conditions
-
Actions
-
Unit Group - Pick every unit in SR_Group_Buff and do (Actions)
-
Loop - Actions
- Set VariableSet SR_Target = (Picked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (SR_Target has buff Sanctified Reflection ) Equal to True
-
Then - Actions
- Do nothing
-
Else - Actions
- Unit - Remove Sanctified Reflection (Dummy) from SR_Target
- Unit Group - Remove SR_Target from SR_Group_Buff.
-
If - Conditions
-
Loop - Actions
- Wait 1.00 seconds
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (SR_Group_Buff is empty) Equal to True
-
Then - Actions
- Trigger - Turn off (This trigger)
- Else - Actions
-
If - Conditions
-
Unit Group - Pick every unit in SR_Group_Buff and do (Actions)
Last edited: