Jump to content
Sign in to follow this  
SAS

3 Questions on Scripting and Positions

Recommended Posts

Hi hoping that someone can help me with 3 small issues I have on the Utes map, at position 038018 there is an empty camp, at position 038017 there are 3 buildings I want to have 3 people in the 2nd building however when I place them they always end up on the roof, any ideas for getting them into one of the rooms?

Second issue is this I want a USMC Officer to be a captive in the old days I would just use the code

officer setCaptive true

with officer as the name of the unit, however this doesn't work in ARMA2 for some reason

Third Issue is getting the 2 units to join me I used

[officer, minister] join  me; officer setCaptive false

in Resistence and it worked but it fails in ARMA 2.

Any thoughts?

Share this post


Link to post
Share on other sites

if you use this command in the units inti line it will work, but you need to remove weapons and set his behvior to "careless"

this setcaptive true;

And for hostage joining i have a script i made up a few days back that might be of interest. Its untested for MP though so let me know if there are issues with it. Just create two sqf files named as follows and put the code in them.

hostjoin.sqf

_host = _this select 0;
_caller = _this select 1;
_id = _this select 2;
if (not alive _host) exitwith {
hint "Unit Not Alive"; 
_host removeaction _id;
};
[_host] join _caller;
_host setcaptive false;

_host removeaction _id;

_hostleave = _host addAction ["Leave Hostage", "hostleave.sqf"];

hostleave.sqf

_host = _this select 0;
_caller = _this select 1;
_id = _this select 2;

[_host] join grpNull;
_host setcaptive true;

_host removeaction _id;

_hostjoin = _host addAction ["Rescue Hostage", "hostjoin.sqf"];

Share this post


Link to post
Share on other sites

You must be doing something else wrong because setCaptive works just fine for me, and so does joining captive units to enemy groups.

As for the building, take a look at buildingPos.

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  

×