Hello I have a question

Hello, I have a question. I recently started a game I was wondering if anyone can help, I am attempting to make NPC’s who walk by themselves by using timers and variables. but for some reason they don’t walk I did it when when the variable is 1 they walk one direction when 2 they walk another direction and when 3 they are idle, and they have sounds play randomly like the npc’s laughing audio

And… where is the question?

I recently started a game I was wondering if anyone can help, I am attempting to make NPC’s who walk by themselves by using timers and variables. but for some reason they don’t walk I did it when when the variable is 1 they walk one direction when 2 they walk another direction and when 3 they are idle, and they have sounds play randomly like the npc’s laughing audio how do i do this?

If you set things up like you wanted in the events sheet, and the result is not what you wanted, share a screenshot of the related events and explain both the expected result and the actual result.



here are the events for npc I am also trying to figure out how to add various idles for talking and others
I just need advice to help or guide to make this possible I’m still not a GDevelop professional yet but I’m getting there I know basics

You used inverted timer conditions. This means: “When timer is less than X”.
So when you have three conditions with 5, 15, and 20, when the timer count is at 1, all the conditions are true, so all events are executed in order.
This is probably not what you intended.

no not really can you help I am not very good at gdevelop yet, any help I can get I’ll take, what should I do to get it to work :slight_smile:

To solve this specific timer issue, you need to add more conditions, not inverted timer conditions, to check that the timer is more than 5s (but less than 15s) and more than 15s (but less than 20s), to avoid conflicts.

2 Likes