Hello, I'm trying to make a trigger that will cause all gargoyles on my map to cast stone form when the sun comes up and return to gargoyle form when the moon comes up. However, I've been having some serious troubles trying to get it to work properly.
Here's what I have set up; the gargoyles are placed upon the map in Stone form. When night time rolls around they are given stone form and ordered to use it, then it is removed to ensure they do not use it when being attacked to regen HP and turn invulnerable.
What ends up happening is the beginning works perfectly, they turn from stone form to gargoyle form when the game time turns to 18:00. Then, when they are meant to return to stone form they do nothing and stay in gargoyle form for the rest of the game.
I know the triggers are both firing because I made sure of it through a test, and I've tried replacing the order to "order unit to Gargoyle - Gargoyle Form" on both triggers (as it works on the nighttime one but for some reason not the daytime one)
Is there any reason this trigger may not function properly, or is there a workaround? Thanks.
Here's what I have set up; the gargoyles are placed upon the map in Stone form. When night time rolls around they are given stone form and ordered to use it, then it is removed to ensure they do not use it when being attacked to regen HP and turn invulnerable.
-
MoonlightNPC Night
-
Events
-
Player - Player 1 (Red) types a chat message containing 18 as An exact match (test purposes)
-
Game - The in-game time of day becomes Equal to 18.00
-
-
Conditions
-
Actions
-
Set VariableSet TempUnitType = Moonlight Gargoyle - StoneForm
-
Custom script: set udg_TempNPCGroup = GetUnitsOfType(udg_TempUnitType)
-
Unit Group - Pick every unit in TempNPCGroup and do (Actions)
-
Loop - Actions
-
Unit - Add Stone Form to (Picked unit)
-
Unit - Order (Picked unit) to Undead Gargoyle - Gargoyle Form.
-
Unit - Remove Stone Form from (Picked unit)
-
-
Custom script: call DestroyGroup(udg_TempNPCGroup)
-
-
-
-
MoonlightNPC Day
-
Events
-
Player - Player 1 (Red) types a chat message containing 6 as An exact match
-
Game - The in-game time of day becomes Equal to 6.00
-
-
Conditions
-
Actions
-
Set VariableSet TempUnitType = Moonlight Gargoyle
-
Custom script: set udg_TempNPCGroup = GetUnitsOfType(udg_TempUnitType)
-
Unit Group - Pick every unit in TempNPCGroup and do (Actions)
-
Loop - Actions
-
Unit - Add Stone Form to (Picked unit)
-
Unit - Order (Picked unit) to Undead Gargoyle - Stone Form.
-
Unit - Remove Stone Form from (Picked unit)
-
-
-
Custom script: call DestroyGroup(udg_TempNPCGroup)
-
-
I know the triggers are both firing because I made sure of it through a test, and I've tried replacing the order to "order unit to Gargoyle - Gargoyle Form" on both triggers (as it works on the nighttime one but for some reason not the daytime one)
Is there any reason this trigger may not function properly, or is there a workaround? Thanks.