1
0
mirror of https://codeberg.org/tenplus1/mobs_redo.git synced 2025-06-28 06:30:18 +02:00

Added flying function for mobs (thanks D00Med)

This commit is contained in:
TenPlus1
2017-02-21 15:01:36 +00:00
parent 8201282022
commit 3d1f62b196
3 changed files with 76 additions and 1 deletions

15
api.txt
View File

@ -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