Jump to content
Sign in to follow this  
PicVert

After unassignvehicle they go back to the chopper

Recommended Posts

I have made a script for the chopper land and the gunner and driver be unassigned from the chopper but right after they are out , they come back to the chopper and getin ?? crazy_o.gif

How can I stop that, without use the code allowgetin false.

Some one has an idea ?

PicVert

Share this post


Link to post
Share on other sites

Post your script here and someone will sort it out.

RED

Share this post


Link to post
Share on other sites

There it is smile_o.gif

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_chopper = _this select 0

bla bla bla bla bla bla ....

.....

#lowfuel

_chopper setfuel 0

_chopper sidechat format ["(%1) I need fuel here!", name _chopper]

unassignvehicle gunner _chopper

unassignvehicle driver _chopper

exit

I hope you can find a solution without the code : allowgetin

it will crap all. sad_o.gif

Share this post


Link to post
Share on other sites

I can't test this right now, as i'm at work, but you

have to think about one important thing:

gunner _chopper

driver _chopper

will be no more referable by your script, once they are

out of the chopper.

You should put them both into variables, before having

them disembark, or you will nomore be able to access them.

_gunner = gunner _chopper

_pilot = driver _chopper

very often in scripts i noticed that this is also necessary

to get things to work.

example:

[choppername] exec "xxx.sqs"

_chopper = _this select 0

works

_gunner = gunner _this select 0

doesn't work as far as i remember

_chopper = _this select 0

_gunner = gunner _chopper

then again works

maybe your problem will be found there

:edit - what i mean is:

that you maybe can't

unassignvehicle gunner _chopper

but you can

_gunner = gunner _chopper

unassignvehicle _gunner

~S~ CD

Share this post


Link to post
Share on other sites

I tried, but error unknow operator ¦#¦unassignvehicle...  rock.gif

sad_o.gif

an idea ?

I have defined like that :

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

#loop

blabla

_pilot = driver _chopper

_gunner = gunner _chopper

unassignvehicle _pilot

unassignvehicle _gunner

goto : "loop"

Share this post


Link to post
Share on other sites

Set the helicopters damage up so it can't move.  The AI will automatically jump out. wink_o.gif

Doolittle

Share this post


Link to post
Share on other sites

Try this...

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_foo = driver _chopper

_bar = gunner _chopper

[_foo,_bar] ordergetin false

unassignvehicle _foo

unassignvehicle _bar

...or you may need to reverse the command, but I dont think so.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

_foo = driver _chopper

_bar = gunner _chopper

unassignvehicle _foo

unassignvehicle _bar

[_foo,_bar] ordergetin false

Share this post


Link to post
Share on other sites

YESSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS :P thanks m8 toadlife you're platine ;)

PicVert

Share this post


Link to post
Share on other sites

Glad it worked. smile_o.gif

As for why this happens, when a soldier is in a vehicle he is:

A) Been assigned a spot in the vehicle

and...

B) Ordered to get in the vehicle

When you run the unassignvehicle command on a unit, all it does is remove the unit's assignment for that vehicle. The unit is still under orders to be in that vehicle, so once they vacate their assigned spot, they will imemdiately reboard the vehicle, only they will take the spot of their choice.

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  

×