How do I make an actor spawn with a random chance?


  • Posts: 18
When my player collides with the point actor, the point gets destroyed and spawns an enemy actor. I want the enemy actor to have a 50/50 chance of spawning but I cant figure out how to, any help, ideas?


  • Posts: 856
Set "chance" to [random number between 1 and 100]

If "chance"<=50
 spawn actor

where "chance" is a number attribute


  • *
  • Posts: 2545
Set (Spawn Enemy) to (pick random (0) to (1))
if <(Spawn enemy)=(1)>
create enemy...

Edit: Was beaten to it by GeorgeN


  • Posts: 18
Thanks! It works now, thanks for both of your help ;D