Jump to content
Sign in to follow this  
st3a1th

Get Waypoint script

Recommended Posts

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

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

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 by st3a1th

Share this post


Link to post
Share on other sites

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

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

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

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 by st3a1th

Share this post


Link to post
Share on other sites

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

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 by st3a1th

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×