Added new script hook HOOK_USEOBJECTMAP.

This commit is contained in:
Mr.Stalin
2018-06-19 21:40:27 +03:00
parent 30002664ef
commit 7eaef76f6f
8 changed files with 98 additions and 6 deletions
+14 -1
View File
@@ -497,7 +497,7 @@ int arg2 - event type: 1 - when the resting ends normally, -1 - when pressin
int arg3 - the hour part of the length of resting time
int arg4 - the minute part of the length of resting time
int ret1 - pass 1 to interrupt the resting
int ret1 - pass 1 to interrupt the resting, or pass 0 to continue the rest if it was interrupted by the player using the Esc key.
-------------------------------------------
@@ -506,3 +506,16 @@ HOOK_GAMEMODECHANGE (hs_gamemodechange.int)
Runs once every time when the game mode was changed, like opening/closing the inventory, character screen, pipboy, etc.
int arg1 - event type: 1 - when the player exits the game, 0 - otherwise
-------------------------------------------
HOOK_USEOBJECTMAP (hs_useobjectmap.int)
Runs before the uses animation the map object (or walking/running animation if the player is at a distance from the object).
Hook allows to override the usage animation.
Critter arg1 - critter that uses an object (usually dude_obj)
Obj arg2 - the map object that is used
int arg3 - animation code (see define.h)
int ret1 - pass the animation code to override the animation, or pass -1 to skip the usage animation