PDA

View Full Version : Helicopter doMove



BeePee
Mar 30 2012, 17:47
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)]; //heli1 is the name of helicopter which is supposed to follow me
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?

.kju [PvPscene]
Mar 30 2012, 17:53
nil = [this] execVM "follow.sqf"

BAD error. Please change ASAP to:

nul = [this] execVM "follow.sqf"
or
0 = [this] execVM "follow.sqf"

BeePee
Mar 30 2012, 18:13
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.