diff options
author | TenPlus1 <kinsellaja@yahoo.com> | 2017-10-18 19:56:04 +0100 |
---|---|---|
committer | TenPlus1 <kinsellaja@yahoo.com> | 2017-10-18 19:56:04 +0100 |
commit | ec4ba73bab1140c9a639df05f83921f7e47e1b94 (patch) | |
tree | d277e5011d43509c4f4a6f066a7a8075ed2a3e6d /api.txt | |
parent | f6f3b58ac643b304a4e087facc8623a23e1d9bd7 (diff) |
added custom after_activate function check
Diffstat (limited to 'api.txt')
-rw-r--r-- | api.txt | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1,5 +1,5 @@ -MOB API (13th October 2017) +MOB API (18th October 2017) The mob api is a function that can be called on by other mods to add new animals or monsters into minetest. @@ -110,6 +110,7 @@ Custom mob functions inside mob registry: 'on_rightclick' its same as in minetest.register_entity() 'on_blast' is called when an explosion happens near mob when using TNT functions, parameters are (object, damage) and returns (do_damage, do_knockback, drops) 'on_spawn' is a custom function that runs on mob spawn with 'self' as variable, return true at end of function to run only once. + 'after_activate' is a custom function that runs once mob has been activated with the paramaters (self, staticdata, def, dtime) 'on_breed' called when two similar mobs breed, paramaters are (parent1, parent2) objects, return false to stop child from being resized and owner/tamed flags and child textures being applied. 'on_grown' is called when a child mob has grown up, only paramater is (self). 'do_punch' called when mob is punched with paramaters (self, hitter, time_from_last_punch, tool_capabilities, direction), return false to stop punch damage and knockback from taking place. |