- Joined
- Dec 10, 2007
- Messages
- 65
Hi, ive been making a remake of an old game "Escape from Colditz" and i need to make trigger(s) which makes a guard behave in a certain way if certain conditions are met. These triggers need to be multi-instanciable, meaning that it doesnt just work for one guard, but all of the guards / prisoners.
I have already made "area" buffs which are cast to the prisoners when they step into a new area, and also the prisoners have a passive ability which tells them what nationality they are.
All area buffs are based on the "Endurance" Aura.
All nationality buffs are based on the "Bash" passive ability.
1) Guard - Prisoner in Guard uniform
The guard will run up to the prisoner dressed as a guard and stop him to ask for his pass. If he doesnt have a pass, he is sent to solitary confinement (back in original prisoner uniform) with all inventory lost. The guard cant just stop him immediatly, but needs to be a certain distance away before he can stop the prisoner. Also, if the prisoner/guard runs away he can just shoot them (if in range of a shot). The guard shouldnt just shoot straight away if the prisoner moves alittle bit then stops, he should kind of chase them till a certain distance then get out the rifle.
Ive been having trouble with this one as its abit hit and miss, they will run up to you and ask, but if u run away, they wont shoot / follow (trigger at bottom)
2) Guard - Prisoner in restricted area
The guard will run up to the prisoner, and the prisoner will have a "Caught" buff aquired meaning any guard can now chase this prisoner and capture / shoot him. Similar to the first one, but doesnt require a pass because they will just get sent straight to the solitary confinement.
Pretty much the same situation, submitted trigger at bottom.
3) Guard - Prisoner with Caught Buff
The guard will run up to the prisoner and send to solitary confinement, pretty much identical if the prisoner was in a restricted area.
4) Guard - Prisoner in other nationality quarters
A prisoner is in another nationality quarters other than their own, pretty much acts exactly like if in a restricted area.
Havent had the chance to code this one, because of the unsuccess of the other triggers.
5) Guard - Prisoner in Open Access Area at night time
A prisoner is caught in a open access area at night time, results in the same situation for if they were in a restricted area.
Same problem.
I hope someone out there can help me with these triggers because its really starting to frustrate me. I will +rep and add your name to the credits if you are successful in making these triggers work. If you need more help with me describing the actions/conditions required, just post it up and il try and help. If you need to see my triggers in action I can post up the map with it working. The triggers also dont have to be done in GUI, can be done in JAZZ, im just not that great with JAZZ.
If anyone is also wanting to help with other parts of the map, terraining, triggers, testing, general helping i could post up the map and add to the creator of the map (if enough help was given) with joint credit of the final map release
Here is some code that ive tried to make work, but its very complicated and doesnt work 100% of the time. Needs alot of work
1) Guard - Prisoner in Guard uniform
2) Guard - Prisoner in restricted area
I have already made "area" buffs which are cast to the prisoners when they step into a new area, and also the prisoners have a passive ability which tells them what nationality they are.
All area buffs are based on the "Endurance" Aura.
All nationality buffs are based on the "Bash" passive ability.
1) Guard - Prisoner in Guard uniform
The guard will run up to the prisoner dressed as a guard and stop him to ask for his pass. If he doesnt have a pass, he is sent to solitary confinement (back in original prisoner uniform) with all inventory lost. The guard cant just stop him immediatly, but needs to be a certain distance away before he can stop the prisoner. Also, if the prisoner/guard runs away he can just shoot them (if in range of a shot). The guard shouldnt just shoot straight away if the prisoner moves alittle bit then stops, he should kind of chase them till a certain distance then get out the rifle.
Ive been having trouble with this one as its abit hit and miss, they will run up to you and ask, but if u run away, they wont shoot / follow (trigger at bottom)
2) Guard - Prisoner in restricted area
The guard will run up to the prisoner, and the prisoner will have a "Caught" buff aquired meaning any guard can now chase this prisoner and capture / shoot him. Similar to the first one, but doesnt require a pass because they will just get sent straight to the solitary confinement.
Pretty much the same situation, submitted trigger at bottom.
3) Guard - Prisoner with Caught Buff
The guard will run up to the prisoner and send to solitary confinement, pretty much identical if the prisoner was in a restricted area.
4) Guard - Prisoner in other nationality quarters
A prisoner is in another nationality quarters other than their own, pretty much acts exactly like if in a restricted area.
Havent had the chance to code this one, because of the unsuccess of the other triggers.
5) Guard - Prisoner in Open Access Area at night time
A prisoner is caught in a open access area at night time, results in the same situation for if they were in a restricted area.
Same problem.
I hope someone out there can help me with these triggers because its really starting to frustrate me. I will +rep and add your name to the credits if you are successful in making these triggers work. If you need more help with me describing the actions/conditions required, just post it up and il try and help. If you need to see my triggers in action I can post up the map with it working. The triggers also dont have to be done in GUI, can be done in JAZZ, im just not that great with JAZZ.
If anyone is also wanting to help with other parts of the map, terraining, triggers, testing, general helping i could post up the map and add to the creator of the map (if enough help was given) with joint credit of the final map release
Here is some code that ive tried to make work, but its very complicated and doesnt work 100% of the time. Needs alot of work
1) Guard - Prisoner in Guard uniform
-
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)
- ((Triggering player) controller) Not equal to (Player 2 (Blue) controller)
-
Or - Any (Conditions) are true
-
Conditions
- (Unit-type of (Triggering unit)) Equal to Nazi Guard (No Rifle)
- (Unit-type of (Triggering unit)) Equal to Nazi Guard (Rifle)
-
Conditions
-
Actions
- Set Unit_Guard_Prisoner[1] = Nazi Guard (Rifle) 0061 <gen>
- Set Unit_Guard_Prisoner[2] = (Triggering unit)
- Set guardPost = (Position of Unit_Guard_Prisoner[1])
- Unit - Order Unit_Guard_Prisoner[1] to Move To (Position of Unit_Guard_Prisoner[2])
- Trigger - Turn on guard check starter <gen>
-
Events
-
guard check starter (Initially off)
-
Events
- Unit - A unit comes within 400.00 of Nazi Guard (Rifle) 0061 <gen>
-
Conditions
- ((Triggering player) controller) Not equal to (Neutral Passive controller)
- ((Triggering player) controller) Not equal to (Player 2 (Blue) controller)
-
Or - Any (Conditions) are true
- (Unit-type of (Triggering unit)) Equal to Nazi Guard (No Rifle)
- (Unit-type of (Triggering unit)) Equal to Nazi Guard (Rifle)
-
Actions
- Trigger - Turn on guard loop checker <gen>
- Trigger - Turn off guard uniform pass <gen>
- Trigger - Turn off (This trigger)
-
Events
-
guard loop checker (initially off)
-
Events
- Time - Every 3.00 seconds of game time
-
Conditions
- Kill Equal to False
-
Actions
- Set GuardDistance = (Distance between (Position of Unit_Guard_Prisoner[1]) and (Position of Unit_Guard_Prisoner[2])))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- GuardDistance Less than or equal to 500.00
-
Then - Actions
- Unit - Order Unit_Guard_Prisoner[1] to Move To (Position of Unit_Guard_Prisoner[2])
- Wait 2.50 seconds
- Unit - Order Unit_Guard_Prisoner[1] to Stop
-
Else - Actions
- Set Kill = True
- Unit - Order Unit_Guard_Prisoner[1] to Attack Unit_Guard_Prisoner[2]
-
If - Conditions
-
Events
-
Take Pass or DIE
-
Events
- Unit - A unit comes within 100.00 of Nazi Guard (Rifle) 0061 <gen>
-
Conditions
- ((Triggering player) controller) Not equal to (Player 2 (Blue) controller)
-
Or - Any (Conditions) are true
-
Conditions
- (Unit-type of (Triggering unit)) Equal to Nazi Guard (No Rifle)
- (Unit-type of (Triggering unit)) Equal to Nazi Guard (Rifle)
-
Conditions
-
Actions
- Set Kill = False
- Unit - Order Nazi Guard (Rifle) 0061 <gen> to Stop
- Trigger - Turn off guard loop checker <gen>
- Wait 0.02 seconds
- Game - Display to Player Group - Player 1 (Red) the text: Guard: Stop right there! 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
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Charges remaining in (Item carried by (Triggering unit) of type Pass)) Equal to 1
-
Then - Actions
- Item - Remove (Item carried by (Triggering unit) of type Pass)
-
Else - 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)
-
If - Conditions
- 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>
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
- Game - Display to Player Group - Player 1 (Red) the text: You have been caught without a pass and been sent to solitary confinement.
- Wait 0.00 seconds
- Sound - Play QuestFailed <gen>
- Wait 1.50 seconds
- Unit - Move (Triggering unit) instantly to (Center of solitaryCELL10 <gen>)
- Wait 0.02 seconds
- Camera - Pan camera for Player 1 (Red) to (Center of solitaryCELL10 <gen>) over 0.00 seconds
- Wait 0.02 seconds
- Unit - Change ownership of (Triggering unit) to Player 1 (Red) and Retain color
- Wait 0.02 seconds
- Unit - Replace (Triggering unit) with a Prisoner (Male 2) using The old unit's relative life and mana
- Wait 0.02 seconds
- Selection - Select (Last replaced unit)
- Wait 0.02 seconds
- Sound - Play BattleNetDoorsStereo2 <gen>
- Wait 0.02 seconds
- Trigger - Turn on guard uniform pass <gen>
-
If - Conditions
-
Events
2) Guard - Prisoner in restricted area
-
prisoner restricted
-
Events
- Unit - A unit comes within 700.00 of Nazi Guard (Rifle) 0131 <gen>
-
Conditions
- ((Triggering player) controller) Not equal to (Neutral Passive controller)
- ((Triggering player) controller) Not equal to (Player 2 (Blue) controller)
- (Unit-type of (Triggering unit)) Equal to Prisoner (Male 2)
-
Or - Any (Conditions) are true
-
Conditions
- ((Triggering unit) has buff Caught ) Equal to True
- ((Triggering unit) has buff Restricted Area ) Equal to True
-
Conditions
-
Actions
- Set Unit_Guard_Prisoner[1] = Nazi Guard (Rifle) 0131 <gen>
- Set Unit_Guard_Prisoner[2] = (Triggering unit)
- Set guardPost = (Position of Unit_Guard_Prisoner[1])
- Unit - Order Unit_Guard_Prisoner[1] to Move To (Position of Unit_Guard_Prisoner[2])
- Unit - Add Caught (Endurance Aura) to (Triggering unit)
- Trigger - Turn on prisoner check starter
-
Events
-
prisoner check starter (initially off)
-
Events
- Unit - A unit comes within 400.00 of Nazi Guard (Rifle) 0131 <gen>
-
Conditions
- ((Triggering player) controller) Not equal to (Neutral Passive controller)
- ((Triggering player) controller) Not equal to (Player 2 (Blue) controller)
- (Unit-type of (Triggering unit)) Equal to Prisoner (Male 2)
-
Actions
- Trigger - Turn on prisoner loop checker <gen>
- Trigger - Turn off prisoner restricted <gen>
- Trigger - Turn off (This trigger)
-
Events
-
prisoner loop checker (Initially off)
-
Conditions
- Kill Equal to False
-
Actions
- Set GuardDistance = (Distance between (Position of Unit_Guard_Prisoner[1]) and (Position of Unit_Guard_Prisoner[2])))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Guard Distance Less then or equal to 500.00
-
Then - Actions
- Unit - Order Unit_Guard_Prisoner[1] to Move To (Position of Unit_Guard_Prisoner[2])
- Wait 2.50 seconds
- Unit - Order Unit_Guard_Prisoner[1] to Stop
-
Else - Actions
- Set Kill = True
- Unit - Order Unit_Guard_Prisoner[1] to Attack Unit_Guard_Prisoner[2]
-
If - Conditions
-
Conditions
-
Send to solitary
-
Events
- Unit - A unit comes within 100.00 of Nazi Guard (Rifle) 0131 <gen>
-
Conditions
- ((Triggering player) controller) Not equal to (Player 2 (Blue) controller)
- (Unit-type of (Triggering unit)) Equal to Prisoner (Male 2)
- ((Triggering unit) has buff Caught ) Equal to True
-
Actions
- Set Kill = False
- Unit - Order Nazi Guard (Rifle) 0131 <gen> to Stop
- Trigger - Turn off prisoner loop checker <gen>
- Wait 0.02 seconds
- Game - Display to Player Group - Player 1 (Red) the text: Guard: Stop right there! You are in a Restricted Area!
- 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) 0131 <gen> over 1.50 seconds
- Wait 1.50 seconds
- Game - Display to Player Group - Player 1 (Red) the text: You have been caught in a restricted area and been sent to solitary confinement.
- Wait 0.00 seconds
- Sound - Play QuestFailed <gen>
- Wait 1.50 seconds
- Unit - Move (Triggering unit) instantly to (Center of solitaryCELL10 <gen>)
- Wait 0.02 seconds
- Camera - Pan camera for Player 1 (Red) to (Center of solitaryCELL10 <gen>) over 0.00 seconds
- Wait 0.02 seconds
- Unit - Change ownership of (Last replaced unit) to Player 1 (Red) and Retain color
- Wait 0.02 seconds
- Selection - Select (Last replaced unit)
- Wait 0.02 seconds
- Sound - Play BattleNetDoorsStereo2 <gen>
- Wait 0.02 seconds
- Trigger - Turn on guard uniform pass <gen>
-
Events