c# - Implementing State Machine for Unity3D NPC characters -


i can't seem wrap head around topic , need bit of push forward, maybe example.

i'm developing project including simulating large number of automated characters trying fulfill "needs". characters have need levels stored in scripts simple floating point <0,1> value , check every frame if exceeds given value , try move defined point , satisfy need.

the problem 1 character can have many needs , leads situation when character moves satisfy 1 need , drops below threshold moves satisfy next need. assuming later needs "rise" on time big problem.

i think should implement state machine transition idle -> move satisfy -> wait satisfy -> idle said cant quite understand whole state machine thing. closest understanding me this: https://github.com/nblumhardt/stateless still cant wrap mind around it.

would grateful help, tutorials, examples, anything.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -