Hi there, Im developing a cooking game like Overcooked but in first person. I have multiple food assets that can raw, well done and burned. The issues I
m having is that I cannot find a way to do my customers AI in a way that they come in, choose randomly what they want, receive the food and leave the restaurant. So far I managed to make the customers receive a specific food using a collider that checks the tag of what enters.
If someone could help me that would be great.
Can you show what’s going on? A video and / or screenshots of your BPs and more details of what’s not working would help.
I dont think that showing what I have will help, It was all made very quickly and is more of a workaround than something that I wanna keep on the game. What I need help is to know how can I make an AI that can choose from an array of the foods available when he spawns. The problem I
m having is that I can only make the AIs collider be able to detect one food actor, and If I want him to be able to detect any other food actor, I have to change the tag inside the AIs blueprint.
How the code on the screenshot works:
The overlap component casts to one of my food actors and checks the tag to see if it is that actor that has entered. Then it checks on the branches if the food is raw, well done, or burned. After that, it deletes the overlapped actor, runs a code to pay for the food, waits for a few seconds and then it finally runs a code to leave the restaurant.
Probably there are a thousand ways better to do this, but Im quite new to unreal and unreal
s blueprint method of coding.
Check out the Behavior Tree samples.
Each customer pawn should have a AIController that, in its Event Begin Play handler, starts the behavior tree.
You can then build behavior tasks like Find Empty Spot At Counter, Choose Item To Order, Wait For Item, and so on.