Smarter AI for mobs: stop walking if there is a cliff

Post Reply
LC Creations
Member
Posts: 157
Joined: Mon Feb 18, 2019 02:53

Smarter AI for mobs: stop walking if there is a cliff

by LC Creations » Post

So. I have a mob. I want to prevent mobs from accelerating foward if there is cliff. (Unless they for being pushed back when hit. For this, a person would have to see my code. Im not sure how to implement this.

My code is on Github. Please note that the mob also gets kicked back when hit by a player or another mob. This is intentional

I can't post all my code here so it is on github

https://github.com/LandonAConway/powerr ... ns/api.lua

User avatar
TenPlus1
Member
Posts: 2960
Joined: Mon Jul 29, 2013 13:38
GitHub: tenplus1

Re: Smarter AI for mobs: stop walking if there is a cliff

by TenPlus1 » Post

Look at the is_at_cliff function in mobs redo api:

https://notabug.org/TenPlus1/mobs_redo/ ... i.lua#L960

...the api itself is well commented incase you are looking for other features :)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest