Jump to content
Sign in to follow this  
dai-san

How to: Get a hostage into a vehicle

Recommended Posts

I now have a mission 99.9% finished except for one niggling item.

Basically I have a hostage that once triggered will follow the group player who triggered him (Fine).

My problem is, we play Co-Op using either Veteran or Expert mode and I need the hostage to automatically get in the zodiak when we get to it.

Because of the random amount of 'LIVE' players that could be playing and the fact that we never play SP, ordering the AI to get in manually normally causes confusion and possible player death due to faffing about at the zodiak under enemy fire.

So a way to make the hostage automatically get into the zodiak when his group player does would be great.

Thanks in advance.

Share this post


Link to post
Share on other sites

one of these should work

1. hostage setcaptive true

2. assign him to the vehicle - hostage assignascargo vehicle

3. use Groupname addvehicle vehiclename..

not tested but there are afew more i can't think of right now..

Share this post


Link to post
Share on other sites
one of these should work

1. hostage setcaptive true

2. assign him to the vehicle - hostage assignascargo vehicle

3. use Groupname addvehicle vehiclename..

not tested but there are afew more i can't think of right now..

Thanks for the reply mate but could you be a little more basic (I'm just starting to learn the editor).

Do you mean set up a trigger at the zodiak that does one of the above?

Share this post


Link to post
Share on other sites

To have the Hostage get in zodiak on his own would need some commanding or scripting. Since you do not want to command then scripting would be needed. many ways to do this but if you had the hostage join a player group you would want to have him leave it, unless you need him to do stuff later on, that is another issue. the basic scripting needed could be handled with a trigger that has your side activation present trigger radius 20x20 maybe. in condition have something like

this and (hostagename in thislist)

not sure if syntax is right but should work. Then the onactivation have

[hostagename] join grpnull; hostagename moveincargo zodiakboatname;

and maybe even use the assigncargo command. All scritping commands can be found under bi wiki. Now you may have to play with those but should/may work as is. Now for this to work you have to name your hostage and the zodiak boat and use those names in the trigger. what that should do is have the hostage leave the player group and join group null and then have him getin the boat. Just know the hostage will not be controllable anymore doing it this way.

**update**

Just tested and works great, but hostaged is teleported to vehicle. If you do not want that then use

[hostagename] join grpnull; hostagename assignAsCargo zodiakboatname; [hostagename] orderGetIn true;

in the onactivation field instead of the above. This method does the same, unit joins gprnull and walks to vehicle and gets in. Looks better :D

Edited by Ghost

Share this post


Link to post
Share on other sites

Fantastic reply Ghost644. Just what I needed and explained really well.

Thank you very much.

Share this post


Link to post
Share on other sites

Sorry Ghost644 but it doesn't seem to work for me. Probably me doing something wrong.

I have created a trigger near the CRRC and named the CRRC zodiak

The hostage is called Scout

In the triggers condition I have put:

this and (Scout)

and in the on act I have put:

[scout] join grpnull; Scout assignAsCargo zodiak; [scout] orderGetIn true;

Sorry to be such a pain but all part of the learning curve I suppose ;)

Share this post


Link to post
Share on other sites
Sorry Ghost644 but it doesn't seem to work for me. Probably me doing something wrong.

I have created a trigger near the CRRC and named the CRRC zodiak

The hostage is called Scout

In the triggers condition I have put:

this and (Scout)

and in the on act I have put:

[scout] join grpnull; Scout assignAsCargo zodiak; [scout] orderGetIn true;

Sorry to be such a pain but all part of the learning curve I suppose ;)

everything looks good except the trigger condition needs to be

this and (scout in thislist)

Share this post


Link to post
Share on other sites
everything looks good except the trigger condition needs to be

this and (scout in thislist)

Yeah, was my bad, I left out the in thislist.

Works a treat mate.

Once again, thanks a bunch.

Share this post


Link to post
Share on other sites

Your welcome and I am glad its working for you.

Share this post


Link to post
Share on other sites

For some reason I can't get this to work.

I have a boat waiting for me which I've named "rhib" I have a rifleman named "soldier" on land near the boat. I've created the blufor present trigger but when I run through it he just keeps standing there.

Here's a screeny of the trigger.... http://members.westnet.com.au/scott_k/not%20much/mission.JPG

Any help please?

Share this post


Link to post
Share on other sites

Got it to work, took the and (soldier in thislist); out of the condition field.

Wish I understood why it worked though, as a beginner is there anywhere that explains the logic behind Arma2 scripting? like when, where and how to use all the specific words and symbols that make things happen.

I can see the logic behind a little of it but most of it I'm just copying/pasting from other ppls posts without knowing what the heck it means and how it's working. I want to learn! :)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×