Hi!
I got a problem. I am finished with my mission and everything is just as i want it. But I am running a script for helicopters. It uses gamelogics as waypoints. But everytime i run it on an dedicated server I get this msg: "mando_heliroute: vehicle must be local". The heli I use in my mission is a ai run heli. I am using a heavily modified mando_heliroute_arma script.
inside the script i found this.
if (!local _heli) exitWith {hint "mando_heliroute: vehicle must be local";};
I was told that adding:
if(local heli1)then
{
execVM"script.sqf";
};
in init.sqf would fix this. But the problem is that I cannot have this in init.sqf as I want execVM"script.sqf"; called when a trigger is activated. And putting this "if" other places than init.sqf gives me and "error missing {".
"heli.sqf"
if(local heli1)then
{
_scr = [heli1,[getPos dest1],150, false]execVM"mando_heliroute_arma.sqf"; //waypoint
_scr = [heli1,[getPos dest2],150, false]execVM"mando_heliroute_arma.sqf"; //waypoint
_scr = [heli1,[getPos dest3],75, true]execVM"mando_heliroute_arma.sqf"; //landing zone. Also position where it starts from.
heli1 setVariable ["mando_heliroute", "free"];
};
Where i want this to be put into. But gives me an error missing { when testing mission. If I put it in init.sqf my helicopter starts flying instantly. But I want it in heli.sqf so i can exec script when a condition is met. Like BLUFOR detected by OPFOR.
I hope someone got a good idea about this.
PS: keep in mind that my mission is working just fine with the code below inside my heli.sqf. It is only when i am on ded. server i get the msg about local needed.
_scr = [heli1,[getPos dest1],150, false]execVM"mando_heliroute_arma.sqf"; //waypoint
_scr = [heli1,[getPos dest2],150, false]execVM"mando_heliroute_arma.sqf"; //waypoint
_scr = [heli1,[getPos dest3],75, true]execVM"mando_heliroute_arma.sqf"; //landing zone. Also position where it starts from.
heli1 setVariable ["mando_heliroute", "free"];