Tutorial: Waypoints by Mike323

Waypoints are an awesome improvement from Meteor 1. To make them requires some simple scripting.

About Connection

When you place a waypoint, a green line will connect this one and the last one you created. The object will follow the waypoint which is not connected to any previous waypont and with the lowest ID first, and go from waypoint to waypoint in order. They stop when it reaches the last connected waypoint. If you don't want waypoints to be connected, press C to toggle AutoConnect to OFF. (It will show what state AutoConnect is in at the upper-left hand corner of the screen.) To manually specify which waypoint you want a waypoint to connect to, right click on that waypoint and hit Waypoint Properties. Then, type the ID of the waypoint you want it to connect to.

Binding an Object to a Waypoint

Let's create a test map for this. Hit the New Map button, then hit save. Name this map 'test' or something similar. Create a new object (it can be anything). As you can see by hovering over the object, its ID is 0. Important: Make sure you go into that object's properties and set it's AI Type to No AI.

Now, click on the Waypoints button (keyboard W). Place one near your object. Then, continue to place waypoints in a circle until you reach your object. Right click on the last waypoint and hit Waypoint Properties. Then, type 0 as the next waypoint's ID because the very first waypoint ID is always 0. This will connect all your waypoints.

Create a small rectangular sector right under the Single Start Zone. Open it's properties, make it's type land, and set it's texture to be different from the base sector's. Expand the Script Trigger section and set the Use Script Trigger Section to True. Click on Trigger Text and type the following scripting:

SC_BindObjectToWaypoint(0,0);

What you have just typed is the scripting command for telling an object to get on a waypoint. In the parenthesis, the first 0 is the object's ID and and second 0 is the waypoint ID. For example, if you wanted to bind an object with an ID of 4 to a waypoint with the ID of 9, the trigger would be SC_BindObjectToWaypoint(4,9);

Click out of the properties and hit the button Run Map. Move your player over the sector you created, and the object you placed should move around in a circle.

Added 31 July 2005