I'm faced with an issue I didn't think possible, so I'm not sure why exactly it's occurring but this is what I have so far.
My issue is involving a respawn system, where a unit dies, wait X seconds, you get the idea. However, I noticed that when I tested the respawn it worked, but when I tried to implement it with correct values it no longer worked. The timer is using a variable that is not an array and set to 0, though this still happens when it's replaced with the numbers.
I begun tested what numbers worked and what didn't, and this is what I found:
Here is the respawn (only the relevant parts)
So when I set the value to 95 or anything above, the trigger will not respawn the unit. I will wait for eternity and it will not come. However, when I change the value down by 3 to 92, for whatever reason every unit that died will respawn flawlessly.
My only good idea is that since my map is quite big it could be that the system is forgetting the values if it waits too long. Not sure if that's even a possibility, though.
I know that I must be missing something. Anyone know what it is?
My issue is involving a respawn system, where a unit dies, wait X seconds, you get the idea. However, I noticed that when I tested the respawn it worked, but when I tried to implement it with correct values it no longer worked. The timer is using a variable that is not an array and set to 0, though this still happens when it's replaced with the numbers.
I begun tested what numbers worked and what didn't, and this is what I found:
Here is the respawn (only the relevant parts)
-
The Respawn NH
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
((Triggering unit) is in RespawnUnitGroup.) Equal to True
-
-
Actions
-
Custom script: call GameTimeWait(udg_Respawn_Timer_Creep) <-------------------------------------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Owner of (Triggering unit)) Equal to Neutral Hostile
-
-
Then - Actions
-
Unit - Create 1 (Unit-type of (Triggering unit)) for Neutral Hostile at Creep_Point[(Custom value of (Triggering unit))] facing (Random angle) degrees
-
Unit Group - Add (Last created unit) to RespawnUnitGroup
-
-
-
-
-
TestCommands Copy Copy Copy
-
Events
-
Player - Player 1 (Red) types a chat message containing 2 as An exact match
-
-
Conditions
-
Actions
-
Set VariableSet Respawn_Timer_Creep = 95.00
-
-
-
TestCommands Copy Copy Copy Copy
-
Events
-
Player - Player 1 (Red) types a chat message containing 3 as An exact match
-
-
Conditions
-
Actions
-
Set VariableSet Respawn_Timer_Creep = 92.00
-
-
So when I set the value to 95 or anything above, the trigger will not respawn the unit. I will wait for eternity and it will not come. However, when I change the value down by 3 to 92, for whatever reason every unit that died will respawn flawlessly.
My only good idea is that since my map is quite big it could be that the system is forgetting the values if it waits too long. Not sure if that's even a possibility, though.
I know that I must be missing something. Anyone know what it is?