Home   Help Search Login Register  

Author Topic: Triggering soldiers  (Read 1138 times)

0 Members and 1 Guest are viewing this topic.

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Triggering soldiers
« on: 14 Jul 2007, 18:14:50 »
Hi, there is this mission I'm building with some captive soldiers and it's a bit tricky using triggers. I'm not sure how to create this attribute. Here we go; I have 5 soldeirs captive in enemy territory and they have to wait patiently until the player rescues them.

I've devised one trigger to set off when all the armour is destroyed in their area for them to not be captive anymore, meaning using the setcaptive false code. I wish to use another trigger with that same code but this time the trigger will have a perimiter, I want it to be about 15 to 15 rectangel.

What I want to do is make it so that any soldier who walks out of the trigger will be shot, meaning the enemy will no longer recognize them as captives. I would like to do this with any one soldier, so say if one soldier wonders out of the trigger zone he will shoot them, not just all the soldiers.

How do I make it so that when one player or all the players walk out of the trigger their setcaptive mode will not be true anymore? Thanks all..
Who's hyped for Arma4, long live Arma!

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Triggering soldiers
« Reply #1 on: 15 Jul 2007, 09:25:59 »
I'm no vet or even an amateur at coding but I tried this.
Created a game logic, named it CP(for central point)
created a trigger for each soldier,                Condition:       soldier1 distance CP > 15
                                                             OnActivation:  soldier1 setcaptive false
(I'm not sure how to create an array in a single trigger to include all soldiers at once.)  :confused:
After Trying this it seemed to work well unless a soldier ran away in the opposite direction of the guard (the guard would not react unless the unit come back within range of the guard) Other units of the guards side would respond accordingly though.
To remedy this I just added more guards surrouding the holding area. I'm sure someone else would know a better work around though.

Offline ONoSixIsDown

  • Members
  • *
Re: Triggering soldiers
« Reply #2 on: 15 Jul 2007, 10:49:02 »
I've played around with similar senarios in the past and found that with a small number of captive bots, it's easy enough to create a 15x15 rectangle trigger for each prisoner and group each trigger to a prisoner.  Once grouped you set the condition field to vehicle not present or something along those lines, then in the activation field, put the setcaptive false code.

As long as they arn't grouped from the start, and instead, group up when would be best so no one runs out of the trigger trying to get into formation that should do it.  this should work
CRIMSON REIGN COMMING..... eventually :/

Offline schuler

  • Contributing Member
  • **
Re: Triggering soldiers
« Reply #3 on: 25 Jul 2007, 20:13:20 »
 might help ;;;; also ad a snyc link 2 triggers to set waypoint on the captives when East or West [ what ever you have] come in to activate ;; make a waypoint for them to move to before a  " [name] join player " then when they move to join there open to fire,,,, just trying easys ways to get a job done without a script  :)
« Last Edit: 25 Jul 2007, 20:16:05 by schuler »
Semper Fi