map_update_p_proc for all objects on map and global/hook scripts as well.
void force_encounter(int map)
Can be called either from a global script while traveling on the world map, or from a normal script while on a local map. In either case the encounter occurs shortly after the next time the player moves on the world map. The player will not get an outdoorsman skill check.
void force_encounter_with_flags(int map, int flags)
Does the same thing as force_encounter, but allows the specification of some extra options (see
sfall.h for available flags). Forcing a random encounter on a map that is not normally used for random encounters may cause the player to lose the car, if they have it. In this case use
force_encounter_with_flags with the
ENCOUNTER_FLAG_NO_CAR flag set.
Returns an array of the player’s position data (index: 0 - tile, 1 - elevation, 2 - rotation) when entering the map through exit grids. If entering from the world map, the tile value will be -1. Should be called in
map_enter_p_proc procedure to get the correct position data.
string sfall_func2("get_terrain_name", int x, int y)
Returns the terrain type name for the sub-tile on the world map by the specified coordinates, or by the player’s current position if called without arguments.
Returns 1 if the player is looking at the world map, or 0 at any other time. Obviously this is only useful in global scripts, since normal scripts will never get the chance to run on the world map.
void set_map_enter_position(int tile, int elevation, int rotation)
Overrides the players entry position when entering the map through exit grids. Setting the tile to 0 will put the player on the start hex (default tile and elevation) of the map. Works only in
void set_map_time_multi(float multi)
Adjusts how fast time passes while you’re on the world map. It takes a single float as an argument, where 1 is the normal speed. This function works in addition to the
WorldMapTimeMod setting in
ddraw.ini and the Pathfinder perk, rather than overriding it, so calling
set_map_time_multi(0.5) when the player has 2 levels of Pathfinder would result in time passing at 25% the normal speed on the world map.
void sfall_func3("set_terrain_name", int x, int y, string name)
Overrides the terrain type name for the sub-tile on the world map by the specified coordinates.
void sfall_func2("set_town_title", int areaID, string title)
Sets a floating text for a town on the world map when hovering the cursor over the player’s marker.
- areaID: the ID number of the town from city.txt