From 3d1f62b196ecfb2ee13abf99b7a4e38738016188 Mon Sep 17 00:00:00 2001 From: TenPlus1 Date: Tue, 21 Feb 2017 15:01:36 +0000 Subject: Added flying function for mobs (thanks D00Med) --- api.txt | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'api.txt') diff --git a/api.txt b/api.txt index bfcf012..27c3ae0 100644 --- a/api.txt +++ b/api.txt @@ -1,5 +1,5 @@ -MOB API (31st January 2017) +MOB API (21st February 2017) The mob api is a function that can be called on by other mods to add new animals or monsters into minetest. @@ -298,6 +298,19 @@ This function allows an attached player to move the mob around and animate it at 'dtime' tick time used inside drive function +mobs:fly(self, dtime, speed, can_shoot, arrow_entity, move_animation, stand_animation) + +This function allows an attached player to fly the mob around using directional controls. + + 'self' mob information + 'dtime' tick time used inside fly function + 'speed' speed of flight + 'can_shoot' true if mob can fire arrow (sneak and left mouse button fires) + 'arrow_entity' name of arrow entity used for firing + 'move_animation' string containing movement animation e.g. "walk" + 'stand_animation' string containing movement animation e.g. "stand" + + Certain variables need to be set before using the above functions: 'self.v2' toggle switch -- cgit v1.2.3