Jump to content
Sign in to follow this  
beepee

Helicopter doMove

Recommended Posts

I want to move a chopper to specific position. To position where player is. So I wrote simple script like this:

while {true} do {
(_this select 0) doMove (getPosATL player);
sleep 2;
};

I fire it up like this:

nil = [this] execVM "follow.sqf"

in heli init line.

I also tried those:

while {true} do {
heli1 doMove [((getPosATL player)select 0), ((getPosATL player)select 1)]; [i]//heli1 is the name of helicopter which is supposed to follow me[/i]
sleep 2;
};

and

while {true} do {
(driver (_this select 0)) doMove [((getPosATL player)select 0), ((getPosATL player)select 1)];
sleep 2;
};

This script works perfect when fired for single soldier (he follows me) but not for heli. And it doesn't matter if heli is with engines off or already flying. Whats the propper way of using "doMove" for helis?

Edited by BeePee
Removing unnecessary nervous words.

Share this post


Link to post
Share on other sites
nil = [this] execVM "follow.sqf"

BAD error. Please change ASAP to:

nul = [this] execVM "follow.sqf"

or

0 = [this] execVM "follow.sqf"

Share this post


Link to post
Share on other sites

Tnx for quick reply!

It works now. It looks that the following chopper starts to move when it is some distance from me. I'll use "nul" or "0" from now on.

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  

×