Doodle 10 Posted February 10, 2014 On a dedi server I am using the following script from a Game Logic with null = [] execVM "heli_route.sqf"; in the init and it works perfectly Now if i use the same null = [] execVM "heli_route.sqf"; in the on ACT of a radio alpha trigger is doesnt work. I am pretty sure there must be a different way of calling it from an editor placed radio trigger on a dedi (it works fine on hosted) can anyone help please thanks in advance if (!isServer) exitWith {}; _con3GRP3 = createGroup EAST; _con3 = createVehicle ["O_Heli_Light_02_F", getMarkerPos "heli_spawn", [],0,"NONE"]; _con3 setDir 350; _con3 flyInHeight 40; _VarName = "con3"; _con3 SetVehicleVarName _VarName; call compile format["%1 = _con3", _VarName]; //clearMagazineCargoGlobal _con3; //clearWeaponCargoGlobal _con3; //_con3 setCaptive true; _con3pilot = _con3GRP3 createunit ["O_soldierU_TL_F", [0,0,1], [], 0, "CAN_COLLIDE"]; _VarName = "c3d"; _con3pilot SetVehicleVarName _VarName; call compile format["%1 = _con3pilot", _VarName]; _con3pilot moveInDriver _con3; _con3pilot setCombatMode "RED"; _con3pilot setBehaviour "COMBAT"; _con3pilot allowDamage true; //_con3pilot setCaptive true; sleep 1.0; _con3gunner = _con3GRP3 createunit ["O_soldierU_AR_F", [0,0,1], [], 0, "CAN_COLLIDE"]; _VarName = "c3g"; _con3gunner SetVehicleVarName _VarName; call compile format["%1 = _con3gunner", _VarName]; _con3gunner moveInTurret [_con3, [0]]; _con3gunner setCombatMode "RED"; _con3gunner setBehaviour "COMBAT"; // _con3gunner setCaptive true; _con3 lock true; _waypoint0 = _con3GRP3 addwaypoint[getmarkerpos "m5",0]; _waypoint0 setwaypointtype "move"; _waypoint0 setWaypointTimeout [0, 0, 0]; _waypoint0 setWaypointSpeed "FULL"; _waypoint0 setWaypointBehaviour "AWARE"; _waypoint0 setWaypointFormation "LINE"; _waypoint0 setWaypointCombatMode "RED"; _waypoint0 setWaypointCompletionRadius 10; sleep 0.1; _waypoint1 = _con3GRP3 addwaypoint[getmarkerpos "m9",0]; _waypoint1 setwaypointtype "move"; _waypoint1 setWaypointTimeout [0, 0, 0]; _waypoint1 setWaypointSpeed "NORMAL"; _waypoint1 setWaypointCompletionRadius 100; sleep 0.1; _waypoint2 = _con3GRP3 addwaypoint[getmarkerpos "m8",0]; _waypoint2 setwaypointtype "Move"; _waypoint2 setWaypointTimeout [0, 0, 0]; _waypoint2 setWaypointSpeed "NORMAL"; _waypoint2 setWaypointCompletionRadius 150; sleep 0.1; _waypoint3 = _con3GRP3 addwaypoint[getmarkerpos "m10",0]; _waypoint3 setwaypointtype "move"; _waypoint3 setWaypointTimeout [0, 0, 0]; _waypoint3 setWaypointSpeed "FULL"; _waypoint3 setWaypointBehaviour "AWARE"; _waypoint3 setWaypointCompletionRadius 150; sleep 0.1; _waypoint4 = _con3GRP3 addwaypoint[getmarkerpos "m7",0]; _waypoint4 setwaypointtype "move"; _waypoint4 setWaypointTimeout [0, 0, 0]; _waypoint4 setWaypointSpeed "NORMAL"; _waypoint4 setWaypointBehaviour "AWARE"; _waypoint4 setWaypointCompletionRadius 100; sleep 0.1; _waypoint5 = _con3GRP3 addwaypoint[getmarkerpos "m11",0]; _waypoint5 setwaypointtype "move"; _waypoint5 setWaypointTimeout [0, 0, 0]; _waypoint5 setWaypointSpeed "LIMITED"; _waypoint5 setWaypointCompletionRadius 10; _waypoint6 = _con3GRP3 addwaypoint[getmarkerpos "m4",0]; _waypoint6 setwaypointtype "move"; _waypoint6 setWaypointTimeout [0, 0, 0]; _waypoint6 setWaypointSpeed "NORMAL"; _waypoint6 setWaypointCompletionRadius 100; _waypoint7 = _con3GRP3 addwaypoint[getmarkerpos "m5",0]; _waypoint7 setwaypointtype "move"; _waypoint7 setWaypointTimeout [0, 0, 0]; _waypoint7 setWaypointSpeed "LIMITED"; _waypoint7 setWaypointCompletionRadius 100; _waypoint8 = _con3GRP3 addwaypoint[getmarkerpos "m8",0]; _waypoint8 setwaypointtype "move"; _waypoint8 setWaypointTimeout [0, 0, 0]; _waypoint8 setWaypointSpeed "NORMAL"; _waypoint8 setWaypointCompletionRadius 100; _waypoint9 = _con3GRP3 addwaypoint[getmarkerpos "m6",0]; _waypoint9 setwaypointtype "cycle"; _waypoint9 setWaypointTimeout [0, 0, 0]; _waypoint9 setWaypointSpeed "NORMAL"; _waypoint9 setWaypointCompletionRadius 100; if (true) exitWith {}; Share this post Link to post Share on other sites
KC Grimes 79 Posted February 10, 2014 Can call the script via the game logic and in the beginning of the script include something like trgactive = false, and then put a waitUntil {(trgactive)}, and in the radio trigger OnAct put trgactive = true. Sort of a workaround. Share this post Link to post Share on other sites
cuel 25 Posted February 10, 2014 If you check the heli_route you'll see that exits if it's not the server. To expand on the above, make a trigger with condition heliGo And in the on act it runs the script. The have your radio alpha like heliGo = true; publicVariable "heliGo" Share this post Link to post Share on other sites
Doodle 10 Posted February 10, 2014 Thnaks for the replies guys - just about to test some of this out What I am trying to do is give each of the 10 playes in the mission a "unique" ability - So player one could use radio Alpha and spawn a helo player two could use radio bravo - and create a static etc etc What is bugging me is it all works perfect on hosted - the scripts work fine on dedi if I call them through a GL - but as soon as they go in a radio trigger on a dedi they stop working bottom line is null = [] execVM "heli_route.sqf"; works in GL on dedi but NOT ot on ACT of radio trigger on dedi. But just to go back to the heli_route script you mention that it exits if its not on the server - I used this script as an example I also run this script from a GL placed in the editor with null = [] execVM "heli_route.sqf"; in the init line - it seems to work perfectly our dedi - there is a trigger checking !alive con2 and when con3 is dead it runs the script again (to produce a continual patrolling heli) - I have always used this script for creating continual patrols and assumed it was the way to do it as we have had no issues with it - But no you mention that it if it's not the server. you have got me concerned - Am i doing this wrong? Thanks in advance Share this post Link to post Share on other sites
cuel 25 Posted February 10, 2014 If you run it from a game logic init, the server will run it. Did you try what I wrote? Share this post Link to post Share on other sites
Doodle 10 Posted February 10, 2014 Tried the following - Trigger 1 TYPE - NONE ACTIVATION - NONE COND - heligo ON ACT - null = [] execVM "heli_route.sqf"; Trigger 2 TYPE - NONE ACTIVATION - Radio Bravo COND - This && player == doodle ON ACT - null = [] execVM "heli_route.sqf"; Had a quick test and it seems to work BUT - there is suddenly a massive amount of desync when a second player joins and I have no idea why - we have been playing variations of this mission for the last couple of months with no problem. I might have screwed something esle up somewhere but the only changes really are these triggers - could they be causing it? Not to sure what I would need to do to run it from GL? Thanks in advance Share this post Link to post Share on other sites