mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Updated hook script docs.
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
#define HOOK_STEAL (22)
|
||||
#define HOOK_WITHINPERCEPTION (23)
|
||||
#define HOOK_INVENTORYMOVE (24)
|
||||
#define HOOK_INVENWIELD (25)
|
||||
|
||||
//Valid arguments to list_begin
|
||||
#define LIST_CRITTERS (0)
|
||||
|
||||
@@ -255,12 +255,19 @@ int ret1 - the new ap cost
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
(DEPRECATED)
|
||||
hs_hexmoveblocking.int
|
||||
hs_hexshootblocking.int
|
||||
hs_hexaiblocking.int
|
||||
hs_hexshootblocking.int
|
||||
hs_hexsightblocking.int
|
||||
|
||||
Runs when checking to see if a hex blocks movement or shooting. (or ai-ing, presumably...)
|
||||
|
||||
NOTE: these hook scripts can become very CPU-intensive and you should avoid using them.
|
||||
For this reason, they may be removed in future versions.
|
||||
If you want to check if some tile or path is blocked, use functions: obj_blocking_tile, obj_blocking_line, path_find_to.
|
||||
If you want script to be called every time NPC moves by hex in combat, use hs_movecost hook.
|
||||
|
||||
Critter arg1 - the critter doing the moving
|
||||
int arg2 - the tile number being checked
|
||||
int arg3 - the elevation being checked
|
||||
@@ -388,3 +395,17 @@ Item arg2 - Item being moved
|
||||
Item arg3 - Item being replaced or weapon being reloaded (can be 0)
|
||||
|
||||
int ret1 - Override setting (-1 - use engine handler, any other value - prevent relocation of item/reloading weapon)
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
hs_invenwield.int
|
||||
|
||||
Runs before wielding or unwielding an armor or a weapon by a critter (except when using inventory by PC).
|
||||
An example usage would be to change critter art depending on armor being used or to dynamically customize weapon animations.
|
||||
|
||||
Critter arg1 - critter
|
||||
Obj arg2 - item being wielded or unwielded (weapon/armor), may be 0 when unwielding
|
||||
int arg3 - slot (INVEN_TYPE_*)
|
||||
int arg4 - 1 when wielding, 0 when unwielding
|
||||
|
||||
int ret1 - overrides hard-coded handler (-1 - use engine handler, any other value - override) - NOT RECOMMENDED
|
||||
|
||||
Reference in New Issue
Block a user