* website skeleton * updated bunder to 2.0, added caching * fix missing plugins? * enable deploy for the branch, try to save cache * need to use relative path? * fix missing css * use doc theme * really enable doc theme? * mayeb this time * come on baby * how about now * please ? * pretty please * ehhh * working theme * added hooks * formatting * formatting 2 * added doc yaml from bgforge mls 1.0.7 * no need for nav order * link reference * hooks on top * added global scripts * pages are generated, exclude them * generate site * pip3 ? * maybe now * hooks page is generated automatically * added table of contents to pages * don't waste so much space * switch highlight classes * mark functions as code in description * more formatting * reformat doc with python * loaded offsets * opcode is loaded into yaml, txt no longer necessary * mark unsafe functions * restore hooks page * clarification * deduplicated hooks doc * saner TOC * typo * move more docs * hook scripts doc is now in md * arrays doc is now in md * added data types page * added more info about old behaviour * minor formatting issues * moved more function docs to yaml * all sfall functions docs are transpiled to yaml format * formatting * fix format * add subcategory support * simplified yaml format, added structure doc * simplified structure and added clarification * generated a separate page for hook types * formatting * disambiguation * format clarification * move get_map* to subcategory: doc is not relevant for other functions * simple permalink * fix links * included more info on the main page * more clarification * rename offset > opcode * try to get more sensible baseurl * added best practices page * what's up with the slashes * allow parent pages with no content * separate docs for direct memory access functions * added latest functions * fixed hook types link * move get_explosion_damage to macros * removed duplicated comment * removed old comments * added hook ids * lowercase sfall * more sfall lowercasing * added proper permalinks * changes from mr.stalin * fix typos * clarification * fix direct memory access page * fixed top navlink * fixed urls * checked sfallgv.sav, it's really not bloating much * format clarification * shorter name * add mixed data type, sort * add proc type, link hooks functions * use same terminology * added bool * rearranged index * added unsafe label * move to root * add stats * more upper/lowercase * should work now * added build status * added combat category, added description for modified_ini, moved global script functions into a subcat * special note for set_self * typo * enable children * cleanup * move lists to arrays * show header filename for macro instead * rearrange more items to be more intuitive * build on bionic * separate object manipulation * added object manipulation link to home * typo * formatting * Added a note about charges * punctuation * formatting * moved floor2 to math * changed label color * moved art and appearance to animations * name too long * search note * moved exex_map_update to maps category * moved more functions from other to skills * too much blue * formatting * moved art_cache_clear to art section * empathize that var name must be exactly 8 characters long * update usages for inc_npc_level * separate objects, scripts and variables * updated url * moved get_string_pointer to strings * updated add_extra_msg_file doc * typo * latest doc updates from develop * updated default layout from upstream * applied local changes: subcategory list * remove unnecessary backticks * added new functions * fix STD_PROCEDURE_END display * formatting * don't fail on missing hook id * formatting * updated doc from upstream * added optimization and sslc pages * order ssl and optimization pages below home * really order optimization on top * merge objects_in_radius variants * updated from upstream * tone down link color * fixed formatting for updated theme * updated travis for ruamel * added favicon * restored separator between functions * updated functions.yml * updated sfall functions * rearranged some window and object function * hook updates, pre-arg renaming * hook args renumbering * merged upstream * added new hooks and functions from upstream * remove the long-winded note about macro * switch to gha for jekyll deployment * sudo for deps * try to fix ruamel missing * switch build to master only, ref https://github.com/phobos2077/sfall/pull/241#discussion_r580365212 * update status badge for https://github.com/phobos2077/sfall/pull/241
1.8 KiB
layout, title, nav_order, has_children, has_toc, permalink
| layout | title | nav_order | has_children | has_toc | permalink |
|---|---|---|---|---|---|
| page | Global scripts | 2 | true | false | /global-scripts/ |
Global scripts
As well as the new functions, sfall also adds global scripts. These run independent of any loaded maps, but do not have an attached object. (i.e. using self_obj without using set_self first will crash the script.) To use a global script, the script must have a name which begins with gl and contains a procedure called start, map_enter_p_proc, map_exit_p_proc, or map_update_p_proc. The start procedure will be executed once when the player loads a saved game or starts a new game. The map_*_p_proc procedures will be executed once when a map is being entered/left/updated. If you wish the script to be executed repeatedly, call set_global_script_repeat on the first run of the start procedure using the number of frames between each run as the argument. (0 disables the script, 1 runs it every frame, 2 runs it every other frame etc.)
Global scripts have multiple modes, which can be set using the set_global_script_type function.
- In the default mode (i.e. mode 0) their execution is linked to the local map game loop, so the script will not run in dialogs or on the world map.
[Using mode 1 requires the input wrapper to be enabled. Use
available_global_script_typesto check what is available.] - Obsolete. - In mode 1 their execution is linked to the player input, and so they will run whenever the mouse cursor is visible on screen, including the world map, character dialogs etc.
- In mode 2, execution is linked to the world map loop, so the script will only be executed on the world map and not on the local map or in any dialog windows.
- Mode 3 is a combination of modes 0 and 2, so scripts will be executed on both local maps and the world map, but not in dialog windows.