</code></pre></div></div> <p>Executes <code class="highlighter-rouge">map_update_p_proc</code> for all objects on map and global/hook scripts as well.</p><hr/><h3id="force_encounter"><ahref="#force_encounter"class="anchor-heading"aria-labelledby="force_encounter"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>force_encounter</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">force_encounter</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">map</span><spanclass="p">)</span>
</code></pre></div></div><p>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.</p><hr/><h3id="force_encounter_with_flags"><ahref="#force_encounter_with_flags"class="anchor-heading"aria-labelledby="force_encounter_with_flags"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>force_encounter_with_flags</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">force_encounter_with_flags</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">map</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">flags</span><spanclass="p">)</span>
</code></pre></div></div><p>Does the same thing as force_encounter, but allows the specification of some extra options (see <codeclass="highlighter-rouge">sfall.h</code> 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 <codeclass="highlighter-rouge">force_encounter_with_flags</code> with the <codeclass="highlighter-rouge">ENCOUNTER_FLAG_NO_CAR</code> flag set.</p><hr/><h3id="get_map_enter_position"><ahref="#get_map_enter_position"class="anchor-heading"aria-labelledby="get_map_enter_position"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>get_map_enter_position</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="n">array</span><spanclass="n">get_map_enter_position</span><spanclass="p">()</span>
</code></pre></div></div><p>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 <codeclass="highlighter-rouge">map_enter_p_proc</code> procedure to get the correct position data.</p><hr/><h3id="in_world_map"><ahref="#in_world_map"class="anchor-heading"aria-labelledby="in_world_map"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>in_world_map</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">bool</span><spanclass="n">in_world_map</span>
</code></pre></div></div><p>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.</p><hr/><h3id="set_map_enter_position"><ahref="#set_map_enter_position"class="anchor-heading"aria-labelledby="set_map_enter_position"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>set_map_enter_position</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">set_map_enter_position</span><spanclass="p">(</span><spanclass="kt">int</span><spanclass="n">tile</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">elevation</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">rotation</span><spanclass="p">)</span>
</code></pre></div></div><p>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 <codeclass="highlighter-rouge">map_enter_p_proc</code> procedure.</p><hr/><h3id="set_map_time_multi"><ahref="#set_map_time_multi"class="anchor-heading"aria-labelledby="set_map_time_multi"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>set_map_time_multi</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">set_map_time_multi</span><spanclass="p">(</span><spanclass="kt">float</span><spanclass="n">multi</span><spanclass="p">)</span>
</code></pre></div></div><p>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 <codeclass="highlighter-rouge">WorldMapTimeMod</code> setting in <codeclass="highlighter-rouge">ddraw.ini</code> and the Pathfinder perk, rather than overriding it, so calling <codeclass="highlighter-rouge">set_map_time_multi(0.5)</code> when the player has 2 levels of Pathfinder would result in time passing at 25% the normal speed on the world map.</p><hr/><h3id="set_terrain_name"><ahref="#set_terrain_name"class="anchor-heading"aria-labelledby="set_terrain_name"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>set_terrain_name</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">sfall_func3</span><spanclass="p">(</span><spanclass="s">"set_terrain_name"</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">x</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">y</span><spanclass="p">,</span><spanclass="n">string</span><spanclass="n">name</span><spanclass="p">)</span>
</code></pre></div></div><p>Overrides the terrain type name for the sub-tile on the world map by the specified coordinates.</p><hr/><h3id="set_town_title"><ahref="#set_town_title"class="anchor-heading"aria-labelledby="set_town_title"><svgviewBox="0 0 16 16"aria-hidden="true"><usexlink:href="#svg-link"></use></svg></a><strong>set_town_title</strong></h3><divclass="language-c++ highlighter-rouge"><divclass="highlight"><preclass="highlight"><code><spanclass="kt">void</span><spanclass="n">sfall_func2</span><spanclass="p">(</span><spanclass="s">"set_town_title"</span><spanclass="p">,</span><spanclass="kt">int</span><spanclass="n">areaID</span><spanclass="p">,</span><spanclass="n">string</span><spanclass="n">title</span><spanclass="p">)</span>
</code></pre></div></div><p>Sets a floating text for a town on the world map when hovering the cursor over the player’s marker.</p><divclass="highlighter-rouge"><divclass="highlight"><preclass="highlight"><code>- areaID: the ID number of the town from city.txt