• 🏆 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!

[Trigger] My DBZ Saga Trigger (Created By me)

Status
Not open for further replies.
Level 19
Joined
Jun 16, 2007
Messages
1,574
Ok this is my saga trigger but the reason i am posting it is because if i do not do the event in time it goes straight to the nxt event, and i just added this trigger.

  • Then - Actions
    • Wait until ((Triggering unit) Equal to (Random unit from (Units owned by Player 12 (Brown) matching ((Triggering unit) Equal to (Dying unit))))), checking every 1.00 seconds
but i don't no if it works.


here is full trigger.

  • Saiyan Saga
    • Events
      • Time - Elapsed game time is 30.00 seconds
    • Conditions
    • Actions
      • Wait 15.00 seconds
      • Game - Display to (All players) the text: Saiyan Saga
      • Unit - Create 1 Radditz for Player 12 (Brown) at (Center of WasteLand <gen>) facing Default building facing (270.0) degrees
      • Hero - Set (Last created unit) Hero-level to 30, Hide level-up graphics
      • Cinematic - Ping minimap for (All players) at (Center of WasteLand <gen>) for 20.00 seconds
      • Wait 10.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Radditz
          • (Triggering unit) Equal to (Dying unit)
        • Then - Actions
          • Wait until ((Triggering unit) Equal to (Random unit from (Units owned by Player 12 (Brown) matching ((Triggering unit) Equal to (Dying unit))))), checking every 1.00 seconds
        • Else - Actions
      • Wait 20.00 seconds
      • Unit - Create 1 Radditz for Player 12 (Brown) at (Center of Master Roshi Island <gen>) facing Default building facing (270.0) degrees
      • Hero - Set (Last created unit) Hero-level to 45, Hide level-up graphics
      • Game - Display to (All players) the text: Raddits has been sp...
      • Cinematic - Ping minimap for (All players) at (Center of Master Roshi Island <gen>) for 20.00 seconds
      • Game - Display to (All players) the text: Type -Kame to go to...
      • Wait 10.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Radditz
          • (Triggering unit) Equal to (Dying unit)
        • Then - Actions
          • Wait until ((Triggering unit) Equal to (Random unit from (Units owned by Player 12 (Brown) matching ((Triggering unit) Equal to (Dying unit))))), checking every 1.00 seconds
        • Else - Actions
      • Wait 20.00 seconds
      • Unit - Create 1 Radditz for Player 12 (Brown) at (Center of WasteLand <gen>) facing Default building facing (270.0) degrees
      • Hero - Set (Last created unit) Hero-level to 50, Hide level-up graphics
      • Game - Display to (All players) the text: Raddits has tuke Ki...
      • Cinematic - Ping minimap for (All players) at (Center of WasteLand <gen>) for 20.00 seconds
      • Wait 10.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Radditz
          • (Triggering unit) Equal to (Dying unit)
        • Then - Actions
          • Wait until ((Triggering unit) Equal to (Random unit from (Units owned by Player 12 (Brown) matching ((Triggering unit) Equal to (Dying unit))))), checking every 1.00 seconds
        • Else - Actions
      • Trigger - Turn off Kame CMD <gen>
      • Wait 20.00 seconds
      • Unit - Create 1 Gohan for Player 12 (Brown) at (Center of Islands <gen>) facing Default building facing (270.0) degrees
      • Hero - Set (Last created unit) Hero-level to 21, Hide level-up graphics
      • Game - Display to (All players) the text: Kid Gohan Is ready ...
      • Cinematic - Ping minimap for (All players) at (Center of Islands <gen>) for 20.00 seconds
      • Game - Display to (All players) the text: Type -Islands to go...
      • Wait 10.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Gohan
          • (Owner of (Triggering unit)) Equal to Player 12 (Brown)
          • (Triggering unit) Equal to (Dying unit)
        • Then - Actions
          • Wait until ((Triggering unit) Equal to (Random unit from (Units owned by Player 12 (Brown) matching ((Triggering unit) Equal to (Dying unit))))), checking every 1.00 seconds
        • Else - Actions
      • Wait 20.00 seconds
      • Game - Display to (All players) the text: Kid Gohan has trans...
      • Cinematic - Ping minimap for (All players) at (Center of Islands <gen>) for 20.00 seconds
      • Unit - Create 1 Oozaru for Player 12 (Brown) at (Center of Islands <gen>) facing Default building facing (270.0) degrees
      • Hero - Set (Last created unit) Hero-level to 21, Hide level-up graphics
      • Wait 10.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Oozaru
          • (Owner of (Triggering unit)) Equal to Player 12 (Brown)
          • (Triggering unit) Equal to (Dying unit)
        • Then - Actions
          • Wait until ((Triggering unit) Equal to (Random unit from (Units owned by Player 12 (Brown) matching ((Triggering unit) Equal to (Dying unit))))), checking every 1.00 seconds
          • Trigger - Turn off Island CMD <gen>
        • Else - Actions
      • Wait 20.00 seconds
      • Game - Display to (All players) the text: Come To kami's Look...
      • Cinematic - Ping minimap for (All players) at (Center of Clone Fight At Kami <gen>) for 20.00 seconds
      • Unit - Create 1 (Unit-type of (Triggering unit)) for Player 12 (Brown) at (Center of Clone Fight At Kami <gen>) facing Default building facing (270.0) degrees
      • Hero - Set (Last created unit) Hero-level to (Level of (Triggering unit)), Hide level-up graphics
      • Wait 10.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Last created unit) Equal to (Dying unit)
        • Then - Actions
          • Wait until ((Triggering unit) Equal to (Random unit from (Units owned by Player 12 (Brown) matching ((Triggering unit) Equal to (Dying unit))))), checking every 1.00 seconds
        • Else - Actions
      • Wait 20.00 seconds
      • Game - Display to (All players) the text: Nappa And Vegeta ha...
      • Cinematic - Ping minimap for (All players) at (Center of WasteLand <gen>) for 20.00 seconds
      • Unit - Create 2 Saibaman for Player 12 (Brown) at (Center of WasteLand <gen>) facing Default building facing (270.0) degrees
      • Wait 10.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Last created unit) Equal to (Dying unit)
        • Then - Actions
          • Wait until ((Triggering unit) Equal to (Random unit from (Units owned by Player 12 (Brown) matching ((Triggering unit) Equal to (Dying unit))))), checking every 1.00 seconds
        • Else - Actions
      • Wait 20.00 seconds
      • Unit - Create 1 Nappa for Player 12 (Brown) at (Center of WasteLand <gen>) facing Default building facing (270.0) degrees
      • Hero - Set (Last created unit) Hero-level to 27, Hide level-up graphics
      • Wait 10.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Last created unit) Equal to (Dying unit)
        • Then - Actions
          • Wait until ((Triggering unit) Equal to (Random unit from (Units owned by Player 12 (Brown) matching ((Triggering unit) Equal to (Dying unit))))), checking every 1.00 seconds
        • Else - Actions
      • Wait 20.00 seconds
      • Unit - Create 1 Nappa for Player 12 (Brown) at (Center of WasteLand <gen>) facing Default building facing (270.0) degrees
      • Hero - Set (Last created unit) Hero-level to 45, Hide level-up graphics
      • Wait 10.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Last created unit) Equal to (Dying unit)
        • Then - Actions
          • Wait until ((Triggering unit) Equal to (Random unit from (Units owned by Player 12 (Brown) matching ((Triggering unit) Equal to (Dying unit))))), checking every 1.00 seconds
        • Else - Actions
      • Wait 20.00 seconds
      • Unit - Create 1 Nappa for Player 12 (Brown) at (Center of WasteLand <gen>) facing Default building facing (270.0) degrees
      • Hero - Set (Last created unit) Hero-level to 77, Hide level-up graphics
      • Wait 10.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Last created unit) Equal to (Dying unit)
        • Then - Actions
          • Wait until ((Triggering unit) Equal to (Random unit from (Units owned by Player 12 (Brown) matching ((Triggering unit) Equal to (Dying unit))))), checking every 1.00 seconds
        • Else - Actions
      • Wait 20.00 seconds
      • Game - Display to (All players) the text: Vegeta : *Laughs* S...
      • Unit - Create 1 Vegeta for Player 12 (Brown) at (Center of WasteLand <gen>) facing Default building facing (270.0) degrees
      • Hero - Set (Last created unit) Hero-level to 33, Hide level-up graphics
      • Wait 10.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Last created unit) Equal to (Dying unit)
        • Then - Actions
          • Wait until ((Triggering unit) Equal to (Random unit from (Units owned by Player 12 (Brown) matching ((Triggering unit) Equal to (Dying unit))))), checking every 1.00 seconds
        • Else - Actions
      • Wait 20.00 seconds
      • Unit - Create 1 Oozaru for Player 12 (Brown) at (Center of WasteLand <gen>) facing Default building facing (270.0) degrees
      • Hero - Set (Last created unit) Hero-level to 39, Hide level-up graphics
      • Wait 10.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Last created unit) Equal to (Dying unit)
        • Then - Actions
          • Wait until ((Triggering unit) Equal to (Random unit from (Units owned by Player 12 (Brown) matching ((Triggering unit) Equal to (Dying unit))))), checking every 1.00 seconds
        • Else - Actions
      • Wait 20.00 seconds
      • Game - Display to (All players) the text: Vegeta : *Laughs* S...
      • Unit - Create 1 Vegeta for Player 12 (Brown) at (Center of WasteLand <gen>) facing Default building facing (270.0) degrees
      • Hero - Set (Last created unit) Hero-level to 45, Hide level-up graphics
      • Wait 10.00 seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Last created unit) Equal to (Dying unit)
        • Then - Actions
          • Wait until ((Triggering unit) Equal to (Random unit from (Units owned by Player 12 (Brown) matching ((Triggering unit) Equal to (Dying unit))))), checking every 1.00 seconds
          • Trigger - Turn off (This trigger)
        • Else - Actions
 
Level 6
Joined
Sep 5, 2007
Messages
264
Possible Fix

Set a unit-type variable to what you want it to wait for.

Use generic when unit dies event, use condition to check and see if it is the type of the one in the variable, if so set boolean variable.
EG: saga_done[1]=true

In the saga trigger, check that boolean variable. That should get the result you're looking for.

But, be careful, I've been told that in certain situations, unit vars will leak. Make sure that you clean up your leaks, especially in the unit dies trigger, otherwise you find that the game will gradually lag more and more. If you don't know what a leak is, search the tutorials.
 
Level 13
Joined
Nov 20, 2006
Messages
553
first in map initilization set event = 0

then in trigger
  • Events
    • Unit - A unit Dies
  • Conditions
    • ((Owner of (Dying unit)) Equal to Player 12 (Brown)) and (((Dying unit) is A Hero) Equal to True)
  • Actions
    • Set Event = (Event + 1)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • Event Equal to 1
      • Then - Actions
        • Game - Display to (All players) for 30.00 seconds the text: Saiyan Saga
        • Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing (270.0) degrees
        • Hero - Set (Last created unit) Hero-level to 30, Hide level-up graphics
        • Cinematic - Ping minimap for (All players) at (Center of (Playable map area)) for 1.00 seconds
      • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Event Equal to 2
          • Then - Actions
            • Game - Display to (All players) for 30.00 seconds the text: Radditz has been...
            • Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing (270.0) degrees
            • Hero - Set (Last created unit) Hero-level to 30, Hide level-up graphics
            • Cinematic - Ping minimap for (All players) at (Center of (Playable map area)) for 1.00 seconds
          • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Event Equal to 3
              • Then - Actions
                • Game - Display to (All players) for 30.00 seconds the text: Saiyan Saga
                • Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing (270.0) degrees
                • Hero - Set (Last created unit) Hero-level to 30, Hide level-up graphics
                • Cinematic - Ping minimap for (All players) at (Center of (Playable map area)) for 1.00 seconds
              • Else - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • Event Equal to 10
                  • Then - Actions
                    • Trigger - Turn off (This trigger)
                  • Else - Actions
                    • Do nothing
 
Status
Not open for further replies.
Top