mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added the description of HOOK_EXPLOSIVETIMER to hookscripts.txt.
Edited the example script. Updated version number.
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
;sfall configuration settings
|
||||
;v4.0.7
|
||||
;v4.1
|
||||
|
||||
[Main]
|
||||
;Change to 1 if you want to use command line args to tell sfall to use another ini file.
|
||||
|
||||
+8
-1
@@ -1,9 +1,16 @@
|
||||
/*
|
||||
Example implementation of the algorithm of the game engine setting the timer of explosives.
|
||||
Example implementation of the algorithm of how the game engine sets the explosive timer.
|
||||
*/
|
||||
|
||||
#include "..\..\scripting_docs\headers\sfall.h"
|
||||
#include "..\..\scripting_docs\headers\define_lite.h"
|
||||
|
||||
// from CONDTION.H
|
||||
#define ROLL_CRITICAL_FAILURE (0)
|
||||
#define ROLL_FAILURE (1)
|
||||
#define ROLL_SUCCESS (2)
|
||||
#define ROLL_CRITICAL_SUCCESS (3)
|
||||
|
||||
procedure start;
|
||||
|
||||
procedure start begin
|
||||
@@ -518,3 +518,16 @@ Obj arg2 - the object being used
|
||||
int arg3 - the animation code being used (see ANIM_* in Animcomd.h)
|
||||
|
||||
int ret1 - overrides the animation code (pass -1 if you want to skip the animation)
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
HOOK_EXPLOSIVETIMER (hs_explosivetimer)
|
||||
|
||||
Runs after setting the explosive timer. You can override the result.
|
||||
|
||||
int arg1 - the time in ticks set in the timer
|
||||
Obj arg2 - the explosive object
|
||||
int arg3 - the result of engine calculation of whether the timer was set successfully: 1 - failure, 2 - success (similar to ROLL_* in Condtion.h)
|
||||
|
||||
int ret1 - overrides the time of the timer (maximum 18000 ticks)
|
||||
int ret2 - overrides the result of engine calculation: 1 - failure, 2 - success, any other value - use engine handler
|
||||
|
||||
Reference in New Issue
Block a user