Make a Boss attacking algorithm (solved)

How do I…

I am trying to have a basic algorithm for my boss in the game I am making.

What is the expected result

The boss will randomly choose a number variable in a range based on how much health it has.

What is the actual result

After adding in the events whenever I run a preview on the scene my gdevelop crashes. I checked that these events were the problem by deactivating them to see if the scene would still crash. It didn’t but I don’t know why it causes my game to crash.

Related screenshots

Why are you using “while these events are true”? Then a trigger once? Would it not be better to have a normal event minus the trigger once?

1 Like

That makes a lot of sense. I overthought it. After making those changes I can now fix what’s left to do. Thank you!