• 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] wait interference

Status
Not open for further replies.
Level 5
Joined
Dec 10, 2007
Messages
65
Hi, im working on a map at the moment called: Escape from colditz. Im having problems with a trigger that involves a gaurd chasing a prisoner in a Guard uniform for a pass. If a prisoner (guard uniform) runs away, the guard will attempt to kill him (after a certain wait period). But if the guard catches the prisoner (gaurd uniform) he orders him to hand over a pass. The problem comes that this requires two triggers to fire, one to detect a prisoner gaurd in a large radius, and the other one to detect a prisoner gaurd in a small radius. I will post up the two triggers to make this a little more clearer. Any help would be appreciated. (done in the gui trigger, not jass sorry.)

  • guard uniform pass
  • Events:
    • Unit - A unit comes within 700.00 of Nazi Guard (rifle) 0061<gen>
  • Conditions:
    • ((Triggering player) controller) Not equal to (Neutral Passive controller)
    • (Unit-type of (Triggering unit)) Equal to Nazi Guard (No Rifle)
  • Actions:
    • Set guardPost = (Position of Nazi Guard (Rifle) 0061<gen>)
    • Unit - Order Nazi Guard (Rifle) 0061<gen> to Move To (Position of (Triggering unit))
    • Wait 10.00 seconds
    • If(all Conditions are True) then do (Then Actions) else do (else actions)
      • If - Conditions:
        • (Take Pass or DIE<gen> is queued) Equal to True
      • Then - Actions
        • Skip remaining actions
      • Else - Actions
        • Unit - Order Nazi Guard (Rifle) 0061<gen> to Attack (Triggering unit)
        • Game - Display to (All Players) the text: kill
  • Take Pass or DIE
  • Events:
    • Unit - A unit comes within 100.00 of Nazi Guard (Rifle) 0061<gen>
  • Conditions:
    • (Unit-type of (Triggering unit)) Equal to Nazi Guard (No Rifle)
  • Actions:
    • Unit - Order Nazi Guard (Rifle) 0061<gen> to Stop
    • Trigger - Turn off guard uniform pass <gen>
    • Wait 0.02 seconds
    • Trigger - Remove guard uniform pass <gen> from the trigger queue
    • Wait 0.02 seconds
    • Trigger - Clear all pending triggers from the trigger queue
    • Wait 0.02 seconds
    • Game - Display to Player Group - Player 1 (Red) the text: Guard: Hand over your pass
    • Sound - Play ArrangedTeamInvitation<gen>
    • Unit - Change ownership of (Triggering unit) to Neutral Passive and Retain color
    • Wait 0.02 seconds
    • Selection - Select (Triggering unit)
    • Wait 0.02 seconds
    • Unit - Order (Triggering Unit) to Stop
    • Wait 1.50 seconds
    • Unit - Make (Triggering unit) face Nazi Guard (Rifle) 0061<gen> over 1.50 seconds
    • Wait 1.50 seconds
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • ((Item Carried by (Triggering unit) of type Pass) is owned) Equal to True
      • Then - Actions
        • Item - Set charges remaining in (Item carried by (Triggering unit) of type Pass) to ((Charges remaining in (Item carried by (Triggering unit) of type Pass)) - 1)
        • Wait 0.00 seconds
        • Game - Display to Player Group - Player 1 (Red) the text: You have been ordered to hand over a pass
        • Wait 0.00 seconds
        • Sound - Play QuestCompleted<gen>
        • Wait - 1.50 seconds
        • Unit - Order Nazi Guard (Rifle) 0061 <gen> to Move to guardPost
        • Wait 1.00 seconds
        • Unit - Change ownership of (Triggering unit) to Player 1 (Red) and Retain color
        • Wait 0.02 seconds
        • Selection - select (Triggering unit)
        • Wait 0.02 seconds
        • Player - Make Player 2 (Blue) treat Player 1 (Red) as an Ally
        • Wait 10.00 seconds
        • Trigger - Turn on guard uniform pass <gen>
      • Else - Actions:
        • Game - Display to Player Group - Player 1 (Red) the text: You have been caught without a pass, you have been sent to solitary confinement.
        • Wait 0.00 seconds
        • Sound - Play QuestFailed<gen>
        • Wait 1.50 seconds
        • Sound - Play BattleNetDoorsStereo2 <gen>
        • Wait 1.50 seconds
What happens is when i get close enough with my prisoner gaurd, he comes up to me and asks, then takes one, then runs away, then he comes back and attemps to kill my unit. The text kill is displayed also. Please help, i know it has to do with my first trigger but i cant think what to do. Thanks again.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
The only problem I could detect was the condition in your first trigger

"(Take Pass or DIE<gen> is queued) Equal to True".

You never queued it so he will always come to kill the unit who came close to him.

And why did you make several "Wait 0.00" how does that help you beside massing actions for no reason ?
 
Status
Not open for further replies.
Top