lebson506th 0 Posted November 26, 2007 I am trying to create a script that moves a given tank to the position of a given waypoint, but when a given radio command is pressed. Here is the code I have: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_vcl = _this select 0; _end = _this select 1; _radio = _this select 2; _side = side _vcl; _grp = createGroup _side; _grp addVehicle _vcl; _trig = createTrigger["EmptyDetector", position _vcl]; _trig setTriggerArea[1,1,0,false]; _trig setTriggerActivation[_radio,"PRESENT",false]; _wp = _grp addWaypoint [getPos _vcl, 0]; _wp setWaypointType "MOVE"; _trig synchronizeWaypoint[[_grp, 0]]; _wp2 = _grp addWaypoint [getMarkerPos _end, 1]; _wp2 setWaypointType "MOVE"; The problem is that the radio trigger doesn't show up. The reason i can't just do this in the editor is that I want to be able to do this every time the vehicle spawns, not just the first time. And here is another error I am getting: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">'_wp2 = _grp |#|addWaypoint [getMarkerPos _end, 1];' Error 0 elements provided, 3 expected Here is the call to the script: [this, end, "ALPHA"] exec "tankmove.sqs"; Where end is a marker. Also, as a side note for a different part of this script. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_driver = "SoldierEB" createVehicle position _vcl; sleep 1; _driver action ["GETINDRIVER", _vcl]; I have also tried <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">driver assignAsDriver _vcl; [_driver] orderGetIn true; and <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_driver moveInDriver _vcl; They all spawn the soldier, but don't put him in the vehicle. Share this post Link to post Share on other sites
kocrachon 2 Posted November 26, 2007 i know this is going to sound crazy... but did you include the command showradio Share this post Link to post Share on other sites
lebson506th 0 Posted November 26, 2007 Doesn't change anything =/ Share this post Link to post Share on other sites
lebson506th 0 Posted November 27, 2007 Any thoughts? Share this post Link to post Share on other sites