Link Search Menu Expand Document

Maps and Encounters

Подкатегории

Функции


exec_map_update_scripts

funcX

void exec_map_update_scripts()

Executes map_update_p_proc for all objects on map and global/hook scripts as well.


force_encounter

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.


force_encounter_with_flags

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.


get_map_enter_position

array get_map_enter_position()

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.


set_map_enter_position

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 map_enter_p_proc procedure.


set_map_time_multi

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.