Trigger revives creeps at 0, 0 and not their start location.

Kayoss666

Member
Reaction score
7
i have two triggers to revive the creeps in my dungeons. i did display checks to make sure it all works and according to the display text it should but it doesn't. instead of the creep appearing where it should it appears at point 0, 0. i dont know why.
Trigger 1- stores the starting locations.
Trigger:
  • DungeonCreepRevive
    • Events
    • Conditions
    • Actions
      • Set DCreep_Count = 0
      • Wait 1.00 seconds
      • Unit Group - Pick every unit in DungeonCreeps and do (Actions)
        • Loop - Actions
          • Game - Display to (All players) the text: (String(DCreep_Count))
          • Set DCreep_Count = (DCreep_Count + 1)
          • Set DCreep_Start_Position[DCreep_Count] = (Position of (Picked unit))
          • Unit - Set the custom value of (Picked unit) to DCreep_Count
          • Game - Display to (All players) the text: ((String((X of DCreep_Start_Position[DCreep_Count]))) + (, + (String((Y of DCreep_Start_Position[DCreep_Count])))))
          • Game - Display to (All players) the text: (String((Number of units in DungeonCreeps)))

trigger 2 - revives them when they die
Trigger:
  • ReviveDCreeps
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is in DungeonCreeps) Equal to True
    • Actions
      • Game - Display to (All players) the text: (String((Custom value of (Dying unit))))
      • Game - Display to (All players) the text: ((String((X of DCreep_Start_Position[(Custom value of (Dying unit))]))) + (, + (String((Y of DCreep_Start_Position[(Custom value of (Dying unit))])))))
      • Wait (Random real number between 20.00 and 25.00) seconds
      • Unit - Create 1 (Unit-type of (Dying unit)) for Neutral Hostile at DCreep_Start_Position[(Custom value of (Dying unit))] facing (Random angle) degrees
      • Unit - Set the custom value of (Last created unit) to (Custom value of (Dying unit))
      • Unit Group - Add (Last created unit) to DungeonCreeps
      • Cinematic - Ping minimap for (All players) at (Position of (Last created unit)) for 1.00 seconds


the displays in trigger two also show the right values but for some reason the creeps are revived at 0, 0. i really am at a loss on why:banghead:?
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
because you use "dying unit" instead of "triggering unit" if you change it it should work.

Why is that? Because "dying unit" doesnt work after a "wait" action in a trigger. Once you have a wait, even if its just for 0.0 seconds, all even responses are gone forever exept for triggering unit.
 

Kayoss666

Member
Reaction score
7
because you use "dying unit" instead of "triggering unit" if you change it it should work.

Why is that? Because "dying unit" doesnt work after a "wait" action in a trigger. Once you have a wait, even if its just for 0.0 seconds, all even responses are gone forever exept for triggering unit.

i will have to say you are incorrect cause i have another revive trigger that also uses dying unit and it works perfectly fine. which is why this trigger is driving me insane. all my checks show that it works but all the creeps revived by this trigger spawn at 0, 0 but the other trigger spawns them at their starting position.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
Try it out, change every instance of dying unit to triggering unit and see for yourself.
 

Kayoss666

Member
Reaction score
7
i have found the problem.
Trigger:
  • ReviveDCreeps
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is in DungeonCreeps) Equal to True
    • Actions
      • Game - Display to (All players) the text: (String((Custom value of (Dying unit))))
      • Game - Display to (All players) the text: ((String((X of DCreep_Start_Position[(Custom value of (Dying unit))]))) + (, + (String((Y of DCreep_Start_Position[(Custom value of (Dying unit))])))))
      • Wait (Random real number between 20.00 and 25.00) seconds
      • Game - Display to (All players) the text: (String((Custom value of (Dying unit))))
      • -------- i have also tried triggering unit --------
      • Unit - Create 1 (Unit-type of (Dying unit)) for Neutral Hostile at DCreep_Start_Position[(Custom value of (Dying unit))] facing (Random angle) degrees
      • Unit - Set the custom value of (Last created unit) to (Custom value of (Dying unit))
      • Unit Group - Add (Last created unit) to DungeonCreeps
      • Cinematic - Ping minimap for (All players) at (Position of (Last created unit)) for 1.00 seconds


during the wait my units custom value is set to zero and i don't really know why?
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
I dont know your triggers.
But telling from those you have posted that shouldnt occur.

You should nevertheless still use "triggering unit" as dying unit is unsafe.
 

NotInTheFace

Member
Reaction score
17
The unit was probably removed from the game (dying unis are removed after their corpses finish decaying) during the wait.
 

Kayoss666

Member
Reaction score
7
Problem solved with new and problem found
i will try to figure it out but if not back to the thread.

oh and just encase you want to know the problem was my creeps was set to does not decay and needed to be does decay.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top