01E1
Jump to navigation
Jump to search
- Description
- Sets the character's objective to follow a route
- Syntax
- 01E1: set_actor [char handle] follow_route [int1] [int2]
- Parameter
- [char handle]
- The handle of the character
- [int1]
- Route
- [int2]
- Mode (see below)
This opcode sets the character's objective to walk along a route created by opcode 01E2. If the path is obstructed, the character cannot complete the route. When used on the player character, the player character becomes uncontrollable as it follows the route. Entering a vehicle, getting wasted, or getting busted regains control of the player character. Assigning certain objectives or clearing it using opcode 011C will stop any character from following the route.
Follow route modes
Mode | Enum | Notes |
---|---|---|
0 | FOLLOW_ROUTE_INVALID | Walks straight to the center of the map (0,0) |
1 | FOLLOW_ROUTE_ONCE | Follows the route once, then walks straight to the center of the map (0,0) |
2 | FOLLOW_ROUTE_BACKFORWARD | Follows the route in loop, when reaches the end walks back, e.g. 1,2,3,4,3,2,1,2,3,... |
3 | FOLLOW_ROUTE_LOOP | Follows the route in loop, when reaches the end starts at the beginning, e.g. 1,2,3,4,1,2,3,4,1,... |
Any values outside this range will act like value 0.
Keywords
set, actor, character, ped, follow, route, path