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?
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?