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

increase go_to time to 20 and add force flag to do_attack

This commit is contained in:
tenplus1
2024-05-25 07:50:16 +01:00
parent 1536b9a5fc
commit 313382dcaa
2 changed files with 8 additions and 6 deletions

View File

@ -402,7 +402,8 @@ Each mob contains a set of functions that can be called for use internally or fr
another mod entirely, replace mob_class with the mob entity variable:
mob_class:mob_sound(sound) -- play sound at mob position
mob_class:do_attack(player) -- if not already attacking, attack object given
mob_class:do_attack(player [, force]) -- if not already attacking, attack object given,
forced being true stops attacking current target and focuses on one given
mob_class:stop_attack() -- stops mob attacking
mob_class:collision() -- checks for player collision with mob and returns {x, z} vector
mob_class:set_velocity(velocity) -- move at velocity in the facing direction