Welcome to the Builder Academy

Question mob that is not sentinel

More
19 Apr 2018 23:20 #7966 by JTP
mob that is not sentinel was created by JTP
Ok We all know sentinel mobs cant move.

Iwe made a POS_FLYING State and it works perfectly for players. But If a mob is POS_FLYING Then i doesnt move on its own...How ever i Can switch into it and move just fine.

So what am i missing so a mob Will still move when its POS_FLYING ?

Please Log in or Create an account to join the conversation.

More
20 Apr 2018 00:06 #7968 by thomas

Please Log in or Create an account to join the conversation.

More
20 Apr 2018 19:37 #7971 by JTP
Replied by JTP on topic mob that is not sentinel
&& (GET_POS(ch) == POS_STANDING || GET_POS(ch) == POS_FLYING) &&

Or

&& ((GET_POS(ch) == POS_STANDING) || (GET_POS(ch) == POS_FLYING)) &&

Please Log in or Create an account to join the conversation.

More
20 Apr 2018 20:27 #7972 by lacrc
Replied by lacrc on topic mob that is not sentinel
Just my opinion here but if POS_STANDING is still 8 and you added POS_FLYING after with the value of 9 then you can simply do:
Code:
(GET_POS(ch) >= POS_STANDING)
That way you also cover your bases for other different non movement impairing positions in the future (plus it's only one condition :D)

Please Log in or Create an account to join the conversation.

More
20 Apr 2018 22:31 #7974 by thomas
Replied by thomas on topic mob that is not sentinel

JTP wrote: && (GET_POS(ch) == POS_STANDING || GET_POS(ch) == POS_FLYING) &&

Or

&& ((GET_POS(ch) == POS_STANDING) || (GET_POS(ch) == POS_FLYING)) &&

Did you try both?
I mean, they're pretty similar, so you could try one and then see if it works.

Please Log in or Create an account to join the conversation.

More
21 Apr 2018 07:12 #7976 by JTP
Replied by JTP on topic mob that is not sentinel
Well now there are also the >= POS_STANDING suggestion, that also works.

Many ways seems to work, Just thought there might be a best practice of doing it, that i might as well learn to do.

Please Log in or Create an account to join the conversation.

Time to create page: 0.207 seconds