OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Captain Crunch on 07 Apr 2007, 22:39:08
-
Hi all.
What is the correct Syntax for a script that would create a GetIn Waypoint?
I have something like this:
;Forms the group.
[S2, S3, S4] Join S1;
;Gives a name to the group.
Grp1 = Group S1;
;Creates a waypoint for the group.
Grp1 AddWaypoint [Position S1, 0];
;Sets the waypoint type.
[Grp1, 0] SetWaypointType "GetIn";
;Sets teh waypoint's postion.
[Grp1, 0] SetWaypointPosition [Position Jeep1, 0]
The only thing that works is that the group is formed and is given the Grp1. I had tried a different way where the group would actually move to the Jeep1's position but did not enter. Anyway, the way the codes are posted above, I get no error message but it does not work.
Can someone help me?
Thank You very much.
EDIT:
Ok, I found out my mistake about the SetWaypointPos command. I don't need this command. Now I use these codes:
;Forms the group.
[S2, S3, S4] Join S1;
;Gives a name to the group.
Grp1 = Group S1;
;Creates a waypoint for the group.
Grp1 AddWaypoint [Position S1, 0];
;Sets the waypoint type.
[Grp1, 0] SetWaypointType "GetIn";
The units do group, the name is given, and they move the the Jeep1's position but do not get in. I am missing something simple I know it.
Jason
-
Have you tried the waypoint type "getin nearest"?
At least in my experience the 'get in' waypoint doesn't always seem to work.. :dunno:
-
I found it! And it works all the time.
One must assign the units before ordering them to get in:
[Soldier1, Soldier2, Soldier3] Join VIP;
Grp1 = Group VIP;
VIP AssignAsCargo Jeep1;
Soldier1 AssignAsCargo Jeep1;
Soldier2 AssignAsCargo Jeep1;
Soldier3 AssignAsCargo Jeep1;
WP2 = Grp1 AddWaypoint [Position Jeep1, 0];
[Grp1, 2] SetWaypointType "GetIn";
[Grp1, 2] SetWaypointSpeed "Full";
Works perfect.
-
Ah, ok..
The 'get in' waypoint that is put on the map in the editor must do that automatically then, and the created one doesn't.. :scratch: