st3a1th 0 Posted February 3, 2010 Hello I am trying to get AI in a Helicopter by scripted waypoints but I can't get it to work. I have tried getin and get in nearest but neither seems to work. Any ideals _waypoint0 = _group addwaypoint[getmarkerpos"East_WP2-1",0]; _waypoint0 setwaypointtype"GETINN"; _waypoint1 = _group addwaypoint[getmarkerpos"East_WP2-2",0]; _waypoint1 setwaypointtype"Hold"; ---------- Post added at 09:00 PM ---------- Previous post was at 08:40 PM ---------- got it :) had to use getin as one word and nearest as another so getin nearest Share this post Link to post Share on other sites
Monsada 10 Posted February 4, 2010 I had the same problem and I solve it assigning eachs unit in the correct position, assignasDriver, assignascargo, assignasGunner, and last doing [_units] ordergetin; ---------- Post added at 03:00 AM ---------- Previous post was at 02:59 AM ---------- //Movemos el resto como carga { _x assignAsCargo _vehicle; _units = _units - [_x]; } forEach _units; { [_x] orderGetIn true; } forEach _unitsin - [_driver]; Share this post Link to post Share on other sites
st3a1th 0 Posted February 4, 2010 (edited) If i wanted to make a waypoint activated by a trigger how would I accomplish this? so for example if I set unit on a hold waypoint how can i get a switch trigger to get them to move to the next waypoint. Edited February 4, 2010 by st3a1th Share this post Link to post Share on other sites
Bon 12 Posted February 4, 2010 Simple: Press F5 n the editor and draw a line between the waypoint and the trigger, i.e. synchronize waypoint and trigger. This way the certain waypoint is completed if and only if the waypoint condition itself is true AND the trigger gets activated. Share this post Link to post Share on other sites
st3a1th 0 Posted February 4, 2010 I mean via script Share this post Link to post Share on other sites
ProfTournesol 952 Posted February 4, 2010 I mean via script The biki should definitely be your best friend : synchronizeTrigger Share this post Link to post Share on other sites
st3a1th 0 Posted February 5, 2010 so far i have this but don't seem to work any ideals anyone ? _unit = _this select 0; _group = group _unit; _waypoint0 = _group addwaypoint[getmarkerpos"East_WP1",0]; _waypoint0 setwaypointtype"Hold"; _trg=createTrigger["EmptyDetector",getmarkerpos trig1]; _trg setTriggerArea[50,50,0,false]; _trg setTriggerActivation["WEST","PRESENT",true]; _trigger setTriggerType "SWITCH" _trigger synchronizeTrigger [_waypoint0, _waypoint1] _trg setTriggerStatements ["this", "hint 'Trigger activated'", _waypoint0 = _group addwaypoint[getmarkerpos"East_WP2",0]; _waypoint0 setwaypointtype"Move"; Share this post Link to post Share on other sites
st3a1th 0 Posted February 6, 2010 :( been looking but can't find it yet Share this post Link to post Share on other sites
ProfTournesol 952 Posted February 6, 2010 so far i have this but don't seem to work any ideals anyone ?_unit = _this select 0; _group = group _unit; _waypoint0 = _group addwaypoint[getmarkerpos"East_WP1",0]; _waypoint0 setwaypointtype"Hold"; _trg=createTrigger["EmptyDetector",getmarkerpos trig1]; _trg setTriggerArea[50,50,0,false]; _trg setTriggerActivation["WEST","PRESENT",true]; _trigger setTriggerType "SWITCH" _trigger synchronizeTrigger [_waypoint0, _waypoint1] _trg setTriggerStatements ["this", "hint 'Trigger activated'", _waypoint0 = _group addwaypoint[getmarkerpos"East_WP2",0]; _waypoint0 setwaypointtype"Move"; Hi, your mixing two variable names for the same thing :"_tg" and "_trigger" : chose only one of them. Share this post Link to post Share on other sites
st3a1th 0 Posted February 6, 2010 ok i will try that ---------- Post added at 01:44 PM ---------- Previous post was at 12:52 PM ---------- Ok i have this now but still no luck err _unit = _this select 0; _group = group _unit; _waypoint0 = _group addwaypoint[getmarkerpos"East_WP1",0]; _waypoint0 setwaypointtype"Hold"; _trg=createTrigger["EmptyDetector",getmarkerpos trig1]; _trg setTriggerArea[50,50,0,false]; _trg setTriggerActivation["WEST","PRESENT",true]; _trg setTriggerType "SWITCH" _trg synchronizeTrigger [_waypoint0, _waypoint1] _trg setTriggerStatements ["this", "hint 'Trigger activated'", _waypoint0 = _group addwaypoint[getmarkerpos"East_WP2",0]; _waypoint0 setwaypointtype"Move"; Share this post Link to post Share on other sites
st3a1th 0 Posted February 7, 2010 (edited) I am trying to get trigger to switch from waypoint 0 to waypoint 1 found one issue which has now been fixed so latest is _unit = _this select 0; _group = group _unit; _waypoint0 = _group addwaypoint[getmarkerpos"East_WP1",0]; _waypoint0 setwaypointtype"Hold"; _trg=createTrigger["EmptyDetector",getmarkerpos trig1]; _trg setTriggerArea[50,50,0,false]; _trg setTriggerActivation["WEST","PRESENT",true]; _trg setTriggerType "SWITCH" _trg synchronizeTrigger [_waypoint0, _waypoint1] _trg setTriggerStatements ["this", "hint 'Civilian near player'", "hint 'no civilian near'"]; _waypoint1 = _group addwaypoint[getmarkerpos"East_WP2",0]; _waypoint1 setwaypointtype"Move"; Edited February 7, 2010 by st3a1th Share this post Link to post Share on other sites
st3a1th 0 Posted February 8, 2010 Still cant seem to get it work any pro scripters that have ideal of what is wrong ? Share this post Link to post Share on other sites
st3a1th 0 Posted February 16, 2010 (edited) I found answer i just had to remove _waypoint1 _trg=createTrigger["EmptyDetector",getmarkerpos trig1]; _trg setTriggerArea[50,50,0,false]; _trg setTriggerActivation["WEST","PRESENT",true]; _trg setTriggerType "SWITCH" _trg synchronizeTrigger [_waypoint0] Edited February 16, 2010 by st3a1th Share this post Link to post Share on other sites