What is wrong with this trigger?

addeownage

New Member
Reaction score
3
Im trying to make a trigger that respawns a "picker" 20 seconds after death along with some texts n stuff.

What doesnt work is simply that the picker does not respawns. it seems that only the first trigger works, cuz the sound plays and the first text shows.

This is how the trigger now works:

Trigger:
  • JewDeath
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Dying unit)) Equal to |c00700708Panic Jew|r
          • (Unit-type of (Dying unit)) Equal to |c00700708Sneaky Jew|r
          • (Unit-type of (Dying unit)) Equal to |c00700708Toxic Jew|r
          • (Unit-type of (Dying unit)) Equal to |c00700708Fat Jew|r
    • Actions
      • Set Owner = (Owner of (Dying unit))
      • Sound - Play ISPITHIGH <gen> at 100.00% volume, located at (Position of (Dying unit)) with Z offset 0.00
      • Player Group - Pick every player in Nazis and do (Player - Add 1 to (Picked player) Current lumber)
      • Game - Display to (All players matching ((Owner of (Dying unit)) Equal to (Matching player))) for 20.00 seconds the text: |c00700708Your pick...
      • Leaderboard - Change the value for Player 11 (Dark Green) in (Last created leaderboard) to ((Player 1 (Red) Units Killed) + ((Player 2 (Blue) Units Killed) + ((Player 3 (Teal) Units Killed) + ((Player 4 (Purple) Units Killed) + (Player 5 (Yellow) Units Killed)))))
      • Countdown Timer - Start JewTimer[(Player number of Owner)] as a One-shot timer that will expire in 20.00 seconds
      • Trigger - Add to JewDeath2 <gen> the event (Time - JewTimer[(Player number of Owner)] expires)


AND

Trigger:
  • JewDeath2
    • Events
    • Conditions
    • Actions
      • Set JewPick = (Center of JewPick <gen>)
      • Unit - Create 1 Shade for Owner at JewPick facing Default building facing degrees
      • Game - Display to (All players matching ((Owner of (Dying unit)) Equal to (Matching player))) for 10.00 seconds the text: |c00700708Your pick...
      • Camera - Pan camera for Owner to (Center of JewPick <gen>) over 0.00 seconds
      • Custom script: call RemoveLocation (udg_JewPick)
 

Exide

I am amazingly focused right now!
Reaction score
448
It should work (somewhat.)
It is not MUI, so if one unit die, and five seconds later another player's unit die the first player won't get a Shade -unit.

Try making one trigger out of this, use 'Wait 20 seconds' instead of Timer, remove all variables, and replace all (Dying unit) with (Triggering unit).

Your triggers leaks memory. You should search for (and read) a Memory Leak Tutorial.
 

addeownage

New Member
Reaction score
3
I did have just one trigger with a "wait" in the actions first. but when 2 units died at once, only one of their pickers respawn. thats why i remade the trigger :O, and someone told me to write something like this :/.

this was my first trigger:

Trigger:
  • NaziDeath
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Dying unit)) Equal to |c001607daPrivate|r
          • (Unit-type of (Dying unit)) Equal to |c001607daRiot Polizei|r
          • (Unit-type of (Dying unit)) Equal to |c001607daTorch Nazi|r
          • (Unit-type of (Dying unit)) Equal to |c001607daGrenadier|r
          • (Unit-type of (Dying unit)) Equal to |c001607daGas Thrower|r
    • Actions
      • Sound - Play ISPITHIGH <gen> at 100.00% volume, located at (Position of (Dying unit)) with Z offset 0.00
      • Player Group - Pick every player in Jews and do (Player - Add 1 to (Picked player) Current lumber)
      • Game - Display to (All players matching ((Owner of (Dying unit)) Equal to (Matching player))) for 20.00 seconds the text: |c001607daYour pick...
      • Leaderboard - Change the value for Player 12 (Brown) in (Last created leaderboard) to ((Player 6 (Orange) Units Killed) + ((Player 7 (Green) Units Killed) + ((Player 8 (Pink) Units Killed) + ((Player 9 (Gray) Units Killed) + (Player 10 (Light Blue) Units Killed)))))
      • Wait 20.00 game-time seconds
      • Unit - Create 1 Shade for (Owner of (Dying unit)) at (Center of NaziPick <gen>) facing Default building facing degrees
      • Game - Display to (All players matching ((Owner of (Dying unit)) Equal to (Matching player))) for 10.00 seconds the text: |c001607daYour pick...
      • Camera - Pan camera for (Owner of (Triggering unit)) to (Center of NaziPick <gen>) over 0.00 seconds


only that this is when someone from the other team dies
 

Exide

I am amazingly focused right now!
Reaction score
448
As I said, use (Triggering unit) instead of (Dying unit).
 
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