HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

wait interference

12-10-2007, 04:32 AM#1
BLADE-VvvV
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.)

Trigger:
guard uniform pass
Collapse Events:
Unit - A unit comes within 700.00 of Nazi Guard (rifle) 0061<gen>
Collapse Conditions:
((Triggering player) controller) Not equal to (Neutral Passive controller)
(Unit-type of (Triggering unit)) Equal to Nazi Guard (No Rifle)
Collapse 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
Collapse If(all Conditions are True) then do (Then Actions) else do (else actions)
Collapse If - Conditions:
(Take Pass or DIE<gen> is queued) Equal to True
Collapse Then - Actions
Skip remaining actions
Collapse Else - Actions
Unit - Order Nazi Guard (Rifle) 0061<gen> to Attack (Triggering unit)
Game - Display to (All Players) the text: kill

Trigger:
Take Pass or DIE
Collapse Events:
Unit - A unit comes within 100.00 of Nazi Guard (Rifle) 0061<gen>
Collapse Conditions:
(Unit-type of (Triggering unit)) Equal to Nazi Guard (No Rifle)
Collapse 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
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Item Carried by (Triggering unit) of type Pass) is owned) Equal to True
Collapse 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>
Collapse 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.
12-10-2007, 03:22 PM#2
Zandose
You might want to test this but I don't think the "triggering unit" refers to your unit but the nazi guard.

Maybe if you post the map, or at the proper triggers, I can directly edit it. Do you have the NewGen World Editor so I can do it in JASS?