I posted this question over at NMA and a kind person "Jimmyjay86" suggested that I also post it in here for faster results.
How do I set up waypoints and make the enemy follow them from one side of the map to the other using the FOT editor..?
FOT waypoint tutorials..?
- Jimmyjay86
- Hero of the Glowing Lands
- Posts: 2102
- Joined: Thu Apr 18, 2002 4:02 am
- Location: Wisconsin
- Contact:
I had to search a little before I could get back to with an answer but the simple description can be found in the Editor Readme. If you need a copy of it, I can email it to you. It is pretty straightforward and a few tries at playing with it will make it work. If you need more help ask.
Waypoints
Waypoints are a way of making actors walk around on the map in a realistic way. Anything from patrols walking around a raider camp, to a citizen going about their daily chores can be done with waypoints.
In the editor each waypoint is marked with an entity. Each waypoint in the path must have the same player index (Normally 0) and the same tag name. The waypoint entity can be found in the Misc directory.
There are two kinds of waypoint, "waypoint" and "waypoint_dir"
Waypoint_Dir will make the entity face in the direction indicated when they reach that point.
Ordered Waypoints
Ordered waypoints are a list where the actor knows to walk from point A to point B in a certain order. Each of the waypoints has an Index, starting at 0 for the first point in the path. When an actor reaches a waypoint they check against the Next Waypoint list to find where to go next. Normally ordered waypoints are in a loop, so that an actor walks from index 0, to index 1, to index 2, etc… eventualy ending up back at index 0, where they start the path again.
It is possible to give a list of next waypoints that the actor can pick from, instead of a single index. In the Next Waypoint list field just provide it a list of different index numbers, each seperated by a comma. This is good for creating a random wandering pattern, while maintaining some form of order.
For example: At waypoint 3 the next index is set to 4,5,6 which means that an actor who walks to waypoint 3 will next goto either waypoint 4, 5 or 6.
It is possible to weight which waypoint will be selected next by putting the more waypoints you prefer the actor to goto in multiple times, for example:
3,3,3,3,4 will give an actor a 80% chance of going to waypoint 3, and a 20% chance of going to waypoint 4.
If a waypoint specifies either -1 or a blank for the next waypoint, then actors will stop when they reach it.
Actions at Waypoints
It is possible to cause actors to perform special actions at each waypoint they reach.
Pause will cause the actors to wait for a specified amount of time before moving onto the next waypoint. The time is measured in seconds.
Action allows you to force an actor to perform an animation at the waypoint. You can use this to make it look like a character is checking things, opperating machines or computers, or any other number of tasks. The actor will perform the animation once.
Repeat Action will make the actor perform the action you specified for the entire time it is at the waypoint. Good for patrols who get to the gates of the town and spend 30 seconds looking around, or similar tasks.