Randomised events

Im currently making a game where i need to have randomised events, such as spawning enemies and weapons.

Please help

1 Like

I think the team made a live stream that you can find on youtube about it! This is if you’re talking about waves of enemies

Welcome to the forums!

There are two main blocks used for randomizing events:

image

The first one returns a boolean while the second one returns a number.

A common use case is this:

image

Every second, there is a 50% chance to call spawn_enemy.

Another really common use case is this:

image

There is a 60% chance to call spawn_enemy. There is a 30% chance to call spawn_bad_enemy. There is a 10% chance to call spawn_really_bad_enemy.

Hopefully this helps.

1 Like

There is also tutorials that use the random blocks I mentioned above. Such include:
image
which I know uses that block.

1 Like