Added "get/set_object_data" and "get_object_ai_data" script functions (from Mr.Stalin)

Changed read_byte, read_short, read_int, and read_string functions to not require AllowUnsafeScripting.
This commit is contained in:
NovaRain
2018-12-05 10:14:10 +08:00
parent 65755911f4
commit 4249006ba9
10 changed files with 220 additions and 12 deletions
@@ -550,6 +550,16 @@ Some utility/math functions are available:
> object sfall_func0("loot_obj")
- returns a pointer to the target object (container or critter) of the loot screen
> int sfall_func2("get_object_data", object, int offset)
- returns the data at the specified offset of an object (see OBJ_DATA_* constants in define_extra.h for offsets)
> void sfall_func3("set_object_data", object, int offset, int data)
- sets the data at the specified offset of an object
> int sfall_func2("get_object_ai_data", object, int aiParam)
- returns the setting value from the AI packet of an object (critter)
- use AI_CAP_* constants from define_extra.h for the aiParam argument to get AI value
------------------------
------ MORE INFO -------
------------------------