• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Respawn Trigger

Status
Not open for further replies.
Level 18
Joined
May 11, 2012
Messages
2,103
Is this trigger properly set?

  • Start Timer
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Triggering unit) Equal to Hero[1]
          • (Triggering unit) Equal to Hero[2]
          • (Triggering unit) Equal to Hero[3]
          • (Triggering unit) Equal to Hero[4]
          • (Triggering unit) Equal to Hero[5]
          • (Triggering unit) Equal to Hero[6]
          • (Triggering unit) Equal to Hero[7]
          • (Triggering unit) Equal to Hero[8]
    • Actions
      • Countdown Timer - Start TimerRespawn[(Player number of (Triggering player))] as a One-shot timer that will expire in 30.00 seconds
      • Countdown Timer - Create a timer window for TimerRespawn[(Player number of (Triggering player))] with title Respawn in:
      • Set TimerWindowRespawn[(Player number of (Triggering player))] = (Last created timer window)
      • Countdown Timer - Show TimerWindowRespawn[(Player number of (Triggering player))] for (Player((Player number of (Triggering player))))
cuz it's not working
 
Level 18
Joined
May 11, 2012
Messages
2,103
Is this trigger properly set?

  • Start Timer
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Triggering unit) Equal to Hero[1]
          • (Triggering unit) Equal to Hero[2]
          • (Triggering unit) Equal to Hero[3]
          • (Triggering unit) Equal to Hero[4]
          • (Triggering unit) Equal to Hero[5]
          • (Triggering unit) Equal to Hero[6]
          • (Triggering unit) Equal to Hero[7]
          • (Triggering unit) Equal to Hero[8]
    • Actions
      • Countdown Timer - Start TimerRespawn[(Player number of (Triggering player))] as a One-shot timer that will expire in 30.00 seconds
      • Countdown Timer - Create a timer window for TimerRespawn[(Player number of (Triggering player))] with title Respawn in:
      • Set TimerWindowRespawn[(Player number of (Triggering player))] = (Last created timer window)
      • Countdown Timer - Show TimerWindowRespawn[(Player number of (Triggering player))] for (Player((Player number of (Triggering player))))
cuz it's not working
Btw, this is the trigger detection for hero[] variables

  • Hero Detection
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Triggering unit) belongs to an ally of Player 11 (Dark Green)) Equal to True
          • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 1 (Red)
        • Then - Actions
          • Set Hero[1] = (Triggering unit)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Triggering unit)) Equal to Player 2 (Blue)
            • Then - Actions
              • Set Hero[2] = (Triggering unit)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Owner of (Triggering unit)) Equal to Player 3 (Teal)
                • Then - Actions
                  • Set Hero[3] = (Triggering unit)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Owner of (Triggering unit)) Equal to Player 4 (Purple)
                    • Then - Actions
                      • Set Hero[4] = (Triggering unit)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Owner of (Triggering unit)) Equal to Player 5 (Yellow)
                        • Then - Actions
                          • Set Hero[5] = (Triggering unit)
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Owner of (Triggering unit)) Equal to Player 6 (Orange)
                            • Then - Actions
                              • Set Hero[6] = (Triggering unit)
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Owner of (Triggering unit)) Equal to Player 7 (Green)
                                • Then - Actions
                                  • Set Hero[7] = (Triggering unit)
                                • Else - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Owner of (Triggering unit)) Equal to Player 8 (Pink)
                                    • Then - Actions
                                      • Set Hero[8] = (Triggering unit)
                                    • Else - Actions
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Are you sure those players are allied to Player 11? (Oftentimes that player is used as an enemy). You should try removing that condition altogether and see if it works then.
Also, you should definitely use a loop instead of those ITE's.

I don't have Warcraft installed, but the actions of the second trigger should look like this:
  • For each (Integer A) from 1 to 8, do (Actions)
  • Loop - Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Owner of (Triggering unit)) Equal to Player(Integer A)
      • Then - Actions
        • Set Hero[Integer A] = (Triggering unit)
      • Else - Actions
I'm not sure how "Player(Integer A)" looks in the editor :p
It's like "Player - Convert player index to player" or something?

It should still work though. Or maybe I'm just missing something.
 
Level 18
Joined
May 11, 2012
Messages
2,103
still not working -.-

  • Hero Detection
    • Events
      • Unit - A unit enters Hero Pick Visibility <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Triggering unit)) Equal to (Player((Integer A)))
            • Then - Actions
              • Set Hero[(Integer A)] = (Triggering unit)
            • Else - Actions
  • Start Timer
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Triggering unit) Equal to Hero[1]
          • (Triggering unit) Equal to Hero[2]
          • (Triggering unit) Equal to Hero[3]
          • (Triggering unit) Equal to Hero[4]
          • (Triggering unit) Equal to Hero[5]
          • (Triggering unit) Equal to Hero[6]
          • (Triggering unit) Equal to Hero[7]
          • (Triggering unit) Equal to Hero[8]
    • Actions
      • Countdown Timer - Start TimerRespawn[(Player number of (Triggering player))] as a One-shot timer that will expire in 150.00 seconds
      • Countdown Timer - Create a timer window for TimerRespawn[(Player number of (Triggering player))] with title Respawn in:
      • Set TimerWindowRespawn[(Player number of (Triggering player))] = (Last created timer window)
      • Countdown Timer - Show TimerWindowRespawn[(Player number of (Triggering player))] for (Player((Player number of (Triggering player))))
 
Level 10
Joined
Jan 20, 2011
Messages
492
still not working -.-

  • Hero Detection
    • Events
      • Unit - A unit enters Hero Pick Visibility <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Triggering unit)) Equal to (Player((Integer A)))
            • Then - Actions
              • Set Hero[(Integer A)] = (Triggering unit)
            • Else - Actions
  • Start Timer
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Triggering unit) Equal to Hero[1]
          • (Triggering unit) Equal to Hero[2]
          • (Triggering unit) Equal to Hero[3]
          • (Triggering unit) Equal to Hero[4]
          • (Triggering unit) Equal to Hero[5]
          • (Triggering unit) Equal to Hero[6]
          • (Triggering unit) Equal to Hero[7]
          • (Triggering unit) Equal to Hero[8]
    • Actions
      • Countdown Timer - Start TimerRespawn[(Player number of (Triggering player))] as a One-shot timer that will expire in 150.00 seconds
      • Countdown Timer - Create a timer window for TimerRespawn[(Player number of (Triggering player))] with title Respawn in:
      • Set TimerWindowRespawn[(Player number of (Triggering player))] = (Last created timer window)
      • Countdown Timer - Show TimerWindowRespawn[(Player number of (Triggering player))] for (Player((Player number of (Triggering player))))

Change the condition to;

  • (Triggering unit) equal to Hero[Integer A]
Cause your conditioning more than one death of a hero with 8, so it wont work
 
Level 18
Joined
May 11, 2012
Messages
2,103
Change the condition to;

  • (Triggering unit) equal to Hero[Integer A]
Cause your conditioning more than one death of a hero with 8, so it wont work

I chnged the trigg to this:

  • Start Timer
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • (Triggering unit) Equal to Hero[(Integer A)]
            • Then - Actions
              • Countdown Timer - Start TimerRespawn[(Player number of (Owner of Hero[(Integer A)]))] as a One-shot timer that will expire in 150.00 seconds
              • Countdown Timer - Create a timer window for TimerRespawn[(Player number of (Owner of Hero[(Integer A)]))] with title Respawn in:
              • Set TimerWindowRespawn[(Player number of (Owner of Hero[(Integer A)]))] = (Last created timer window)
              • Countdown Timer - Show TimerWindowRespawn[(Player number of (Owner of Hero[(Integer A)]))] for (Owner of Hero[(Integer A)])
            • Else - Actions
better?
 
Level 18
Joined
May 11, 2012
Messages
2,103
I have the respawn trigger, but it activates after the timer expires. It's not working at all and few other triggers are not working... IDK wtf is wrong with the map. I twiced copy-pasted the things in one map to another aand again doesn't works-...-
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Change the condition to;

  • (Triggering unit) equal to Hero[Integer A]
Cause your conditioning more than one death of a hero with 8, so it wont work
That's what the "OR" is for: if any of those 8 units is the triggering one, the trigger should activate. Using a loop won't do any good (probably :p).

The_blood: I'm going to install Warcraft, post the map here so I can try and see what's going wrong myself. Should be easy to fix then.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
ok, I'll attach it and if you fix that trigg, can you try to fix the other triggs that are bugged?

I have scholll very early tommorow, so be quick ;)
You don't have to wait for me though :p As long as I have the map, I'll be sure to look into it.
I still have to install Warcraft (just found the disks, yay :D).

Btw: which other triggers are bugging then?
 
Status
Not open for further replies.
Top