Home   Help Search Login Register  

Author Topic: Rescue & Joining Group Help  (Read 2149 times)

0 Members and 1 Guest are viewing this topic.

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Rescue & Joining Group Help
« on: 14 Mar 2010, 17:17:47 »
Hi guys I'm creating this missiosn where the seals have to rescue a guy who is captive by enemy forces.

What i want is to simply have the seals move into the captive and when they get up to him, be able to rescue him and join their group there after rescuing how can i do this?

Thanks...
Who's hyped for Arma4, long live Arma!

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: Rescue & Joining Group Help
« Reply #1 on: 15 Mar 2010, 10:43:08 »
Add the follwing line to the captives init line:

Code: [Select]
this addAction ["Secure Hostage", "rescue.sqs"]
Then you write a short sqs script (no need for fancy sqf scripting here) with the following content:

Code: [Select]
myCaptive join myPlayer
When the player is close enough, he will get the "Secure Hostage" option added to the action menu. The script will start when the player executes the action, and the captive jouns the player. Voila!

You may find more information about the addAction command in the COMREF.
OFPEC | Intel Depot
RETARDED Ooops... Retired!