• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Checkpoint system

Status
Not open for further replies.
Level 4
Joined
Jul 22, 2010
Messages
63
Im making an escape map, where I need to everyone that isnt alive to ressurect at one place, I have this trigger:
  • For each (Integer A) from 1 to 10, do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Units[(Integer A)] is dead) Equal to True
        • Then - Actions
          • Unit - Create 1 Wisp for (Owner of Units[(Integer A)]) at (Center of Region 010 <gen>) facing 0.00 degrees
          • Set Units[(Integer A)] = (Last created unit)
          • Item - Remove (Item carried by Units[(Integer A)] of type Jornal - segundo nivel)
          • Hero - Create Jornal - terceiro nivel and give it to Units[(Integer A)]
          • Camera - Pan camera for (Owner of Units[(Integer A)]) to (Center of Region 010 <gen>) over 1.00 seconds
        • Else - Actions
also, the variables:
  • Set Units[1] = Wisp 0012 <gen>
  • Set Units[2] = Wisp 0017 <gen>
  • Set Units[3] = Wisp 0015 <gen>
  • Set Units[4] = Wisp 0019 <gen>
  • Set Units[5] = Wisp 0018 <gen>
  • Set Units[6] = Wisp 0013 <gen>
  • Set Units[7] = Wisp 0016 <gen>
  • Set Units[8] = Wisp 0014 <gen>
  • Set Units[9] = Wisp 0021 <gen>
  • Set Units[10] = Wisp 0020 <gen>
The wisps arent reviving! dunno why! please, help me
thanks in advance
 
Level 4
Joined
Jul 22, 2010
Messages
63
  • Events
    • Unit - A unit enters Region 009 <gen>
  • Conditions
    • (Unit-type of (Triggering unit)) Equal to Wisp
  • Actions
    • Game - Display to (All players) the text: Parte 2 concluida!
    • Set wispsgroup = (Units of type Wisp)
    • Unit Group - Pick every unit in wispsgroup and do (Actions)
      • Loop - Actions
        • Item - Remove (Item carried by (Picked unit) of type Jornal - segundo nivel)
        • Camera - Pan camera for (Owner of (Picked unit)) to (Center of Region 010 <gen>) over 1.00 seconds
        • Unit - Move (Picked unit) instantly to (Center of Region 010 <gen>)
        • Hero - Create Jornal - terceiro nivel and give it to (Picked unit)
    • For each (Integer A) from 1 to 10, do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Units[(Integer A)] is dead) Equal to True
          • Then - Actions
            • Unit - Create 1 Wisp for (Owner of Units[(Integer A)]) at (Center of Region 010 <gen>) facing 0.00 degrees
            • Set Units[(Integer A)] = (Last created unit)
            • Item - Remove (Item carried by Units[(Integer A)] of type Jornal - segundo nivel)
            • Hero - Create Jornal - terceiro nivel and give it to Units[(Integer A)]
            • Camera - Pan camera for (Owner of Units[(Integer A)]) to (Center of Region 010 <gen>) over 1.00 seconds
          • Else - Actions
    • Unit - Create 1 new challenge for Neutral Hostile at (Center of Region 010 <gen>) facing 0.00 degrees
    • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
    • Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
    • Special Effect - Create a special effect at (Center of Region 010 <gen>) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
    • Special Effect - Destroy (Last created special effect)
    • Custom script: call DestroyGroup (udg_wispsgroup)
    • Floating Text - Destroy (Last created floating text)
 
Level 4
Joined
Jul 22, 2010
Messages
63
the point is, I have the variable Units[1-10], how do I set it to be exactly the same when I create new wisps for someone? I mean, if red dies, and someon reaches the checkpoint, I will create new wisp for him, but the wisp wont be = Units[1]
 
Level 4
Joined
Jul 22, 2010
Messages
63
well, heres what I did and didnt worked also!
  • Events
    • Unit - A unit Dies
  • Conditions
    • (Unit-type of (Triggering unit)) Equal to Wisp
  • Actions
    • If ((Owner of (Triggering unit)) Equal to Player 1 (Red)) then do (Set wispdead[1] = True) else do (Do nothing)
    • If ((Owner of (Triggering unit)) Equal to Player 2 (Blue)) then do (Set wispdead[2] = True) else do (Do nothing)
    • If ((Owner of (Triggering unit)) Equal to Player 3 (Teal)) then do (Set wispdead[3] = True) else do (Do nothing)
    • If ((Owner of (Triggering unit)) Equal to Player 4 (Purple)) then do (Set wispdead[4] = True) else do (Do nothing)
    • If ((Owner of (Triggering unit)) Equal to Player 5 (Yellow)) then do (Set wispdead[5] = True) else do (Do nothing)
    • If ((Owner of (Triggering unit)) Equal to Player 6 (Orange)) then do (Set wispdead[6] = True) else do (Do nothing)
    • If ((Owner of (Triggering unit)) Equal to Player 7 (Green)) then do (Set wispdead[7] = True) else do (Do nothing)
    • If ((Owner of (Triggering unit)) Equal to Player 8 (Pink)) then do (Set wispdead[8] = True) else do (Do nothing)
    • If ((Owner of (Triggering unit)) Equal to Player 9 (Gray)) then do (Set wispdead[9] = True) else do (Do nothing)
    • If ((Owner of (Triggering unit)) Equal to Player 10 (Light Blue)) then do (Set wispdead[10] = True) else do (Do nothing)
  • For each (Integer A) from 1 to 10, do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • wispdead[(Integer A)] Equal to True
        • Then - Actions
          • Unit - Create 1 Wisp for (Owner of Units[(Integer A)]) at (Center of Region 010 <gen>) facing 0.00 degrees
          • Set Units[(Integer A)] = (Last created unit)
          • Set wispdead[(Integer A)] = False
          • Item - Remove (Item carried by Units[(Integer A)] of type Jornal - segundo nivel)
          • Hero - Create Jornal - terceiro nivel and give it to Units[(Integer A)]
          • Camera - Pan camera for (Owner of Units[(Integer A)]) to (Center of Region 010 <gen>) over 1.00 seconds
        • Else - Actions
 
Look your trigger :
  • Events
    • Unit - A unit Dies
  • Conditions
    • (Unit-type of (Triggering unit)) Equal to Wisp
  • Actions
    • If ((Owner of (Triggering unit)) Equal to Player 1 (Red)) then do (Set wispdead[1] = True) else do (Do nothing)
    • If ((Owner of (Triggering unit)) Equal to Player 2 (Blue)) then do (Set wispdead[2] = True) else do (Do nothing)
    • If ((Owner of (Triggering unit)) Equal to Player 3 (Teal)) then do (Set wispdead[3] = True) else do (Do nothing)
    • If ((Owner of (Triggering unit)) Equal to Player 4 (Purple)) then do (Set wispdead[4] = True) else do (Do nothing)
    • If ((Owner of (Triggering unit)) Equal to Player 5 (Yellow)) then do (Set wispdead[5] = True) else do (Do nothing)
    • If ((Owner of (Triggering unit)) Equal to Player 6 (Orange)) then do (Set wispdead[6] = True) else do (Do nothing)
    • If ((Owner of (Triggering unit)) Equal to Player 7 (Green)) then do (Set wispdead[7] = True) else do (Do nothing)
    • If ((Owner of (Triggering unit)) Equal to Player 8 (Pink)) then do (Set wispdead[8] = True) else do (Do nothing)
    • If ((Owner of (Triggering unit)) Equal to Player 9 (Gray)) then do (Set wispdead[9] = True) else do (Do nothing)
    • If ((Owner of (Triggering unit)) Equal to Player 10 (Light Blue)) then do (Set wispdead[10] = True) else do (Do nothing)
You should use directly Player Numbers :

  • Set wispdead[Player number of (Triggering Player)] = True
And why you want create a new wisp ? Why you don't revive the old one ?

I know that escapes are generally less indeed coded than mazes/slides, but it's not a reason.

Just when a player finish a level, you kill all others players, and you revive all of them in the region (excepted the one who finished).

And avoid leaks, it's already hard to play (ice) escapes without lags if you don't have any very good bot.
 
Level 4
Joined
Jul 22, 2010
Messages
63
I know the leaks guys, but first, I need to make this trigger work, otherwise wont make sense clearing leaks, and my escape isnt a simple one, it has lots of mixes, if anyone is interested in helping me. I guess I will try to make the wisps a Hero. Maybe this way the trigger will work.
 
Level 3
Joined
Nov 16, 2011
Messages
54
your problem is this line!
  • Unit - Create 1 Wisp for (Owner of Units[(Integer A)]) at (Center of Region 010 <gen>) facing 0.00 degrees
Because the "Units" variable is no longer detectable as DrSG stated above.
Instead use Player Integer A it should fix your problem

Edit: Hey guys first make it work then fix the way it work right? :D stop the leak thing majig
 
Level 12
Joined
Nov 20, 2007
Messages
660
well, heres what I did and didnt worked also!
  • Events
    • Unit - A unit Dies
  • Conditions
    • (Unit-type of (Triggering unit)) Equal to Wisp
  • Actions
    • If ((Owner of (Triggering unit)) Equal to Player 1 (Red)) then do (Set wispdead[1] = True) else do (Do nothing)
    • If ((Owner of (Triggering unit)) Equal to Player 2 (Blue)) then do (Set wispdead[2] = True) else do (Do nothing)
    • If ((Owner of (Triggering unit)) Equal to Player 3 (Teal)) then do (Set wispdead[3] = True) else do (Do nothing)
    • If ((Owner of (Triggering unit)) Equal to Player 4 (Purple)) then do (Set wispdead[4] = True) else do (Do nothing)
    • If ((Owner of (Triggering unit)) Equal to Player 5 (Yellow)) then do (Set wispdead[5] = True) else do (Do nothing)
    • If ((Owner of (Triggering unit)) Equal to Player 6 (Orange)) then do (Set wispdead[6] = True) else do (Do nothing)
    • If ((Owner of (Triggering unit)) Equal to Player 7 (Green)) then do (Set wispdead[7] = True) else do (Do nothing)
    • If ((Owner of (Triggering unit)) Equal to Player 8 (Pink)) then do (Set wispdead[8] = True) else do (Do nothing)
    • If ((Owner of (Triggering unit)) Equal to Player 9 (Gray)) then do (Set wispdead[9] = True) else do (Do nothing)
    • If ((Owner of (Triggering unit)) Equal to Player 10 (Light Blue)) then do (Set wispdead[10] = True) else do (Do nothing)
  • For each (Integer A) from 1 to 10, do (Actions)
    • Loop - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • wispdead[(Integer A)] Equal to True
        • Then - Actions
          • Unit - Create 1 Wisp for (Owner of Units[(Integer A)]) at (Center of Region 010 <gen>) facing 0.00 degrees
          • Set Units[(Integer A)] = (Last created unit)
          • Set wispdead[(Integer A)] = False
          • Item - Remove (Item carried by Units[(Integer A)] of type Jornal - segundo nivel)
          • Hero - Create Jornal - terceiro nivel and give it to Units[(Integer A)]
          • Camera - Pan camera for (Owner of Units[(Integer A)]) to (Center of Region 010 <gen>) over 1.00 seconds
        • Else - Actions

Do NOT use "Do nothing"
 
Status
Not open for further replies.
Top