Home   Help Search Login Register  

Author Topic: Creating Waypoints  (Read 1379 times)

0 Members and 1 Guest are viewing this topic.

Offline Captain Crunch

  • Members
  • *
Creating Waypoints
« 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:

Code: [Select]
;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:

Code: [Select]
;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


Back to the forest!

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Creating Waypoints
« Reply #1 on: 08 Apr 2007, 06:58:37 »
Have you tried the waypoint type "getin nearest"?

At least in my experience the 'get in' waypoint doesn't always seem to work..   :dunno:
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Captain Crunch

  • Members
  • *
Re: Creating Waypoints
« Reply #2 on: 08 Apr 2007, 11:24:13 »
I found it! And it works all the time.
One must assign the units before ordering them to get in:

Code: [Select]
[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.
Back to the forest!

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Creating Waypoints
« Reply #3 on: 08 Apr 2007, 13:08:53 »
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:
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.