Hi! I'm new to scripting and need your help :)
I'm trying to make a simple script that will alow me to set a waypoint to existing units by clicking on the map using repeated radio trigger to activate the script. After some searching, I've came up with this:
onMapSingleClick {
_waypoint = patrol1 addWaypoint [[_pos select 0, _pos select 1, 0], 0, 1]; //patrol1 is created in init.sqf
_waypoint setWaypointStatements ["true", "deleteWaypoint [patrol1, 1]"];
};
This works fine - I can click on the map and the units will go there :).
But I have a problem if I modify the script to define waypoint type. The units will not move at all.
onMapSingleClick {
_waypoint = patrol1 addWaypoint [[_pos select 0, _pos select 1, 0], 0, 1];
_waypoint setWaypoint "MOVE"; // NOT WORKING !
_waypoint setWaypointStatements ["true", "deleteWaypoint [patrol1, 1]"];
};
What's wrong with that? Any help is appreciated. :)