Can you describe in more detail what result you need?
Well, I’m trying to make a rescue mission where the goal is to save the NPC within a set amount of time. If you save them before the time expires, the timer stops and the NPC will go into a knockout state where you can either wake and lead them to safety or just leave them lying on the ground. Right now, I only got one state for the NPC working, and that’s when the timer hits 0. They despawn or die as the game says. I was able to get a working timer, but I don’t know how to get the software to tell which the NPC is in or when to switch between states. So far I have three states planned: Save Sis for when the NPC must be saved, Found Sis for when the NPC is rescued before the timer runs out, and Sis Drowned for when you fail the mission. This is my first time designing a system that’s a bit more complex than just playing an animation or displaying a message. It shouldn’t be this hard. Maybe I’m missing something. I’ll show you to better explain what’s going on.
Hey. You should take a look at behavior or state trees if you want to create more complex AI behavior.
The states I made are boolean variables. I’m trying to use branch nodes to check if each statement is true or not. The thing is it doesn’t seem to recognize any other states besides the dead state. Do state trees have anything to check if statements are true or false?