Random Actors Probability

Member Posts: 13

Hi guys (and girls)

I have been working on a project of which random items appear.
I have set up a timer and a change attribute with random (1,3) <-- as there are 3 actors I want to randomly spawn.
But I want actor 1 to be more frequent that the other actors, (spawn more)
How would I go about doing this?
Any help appreciated,

Dan

• I am here.Member, Sous Chef, PRO Posts: 6,577

Hi @woodywoodster1 and welcome to the Forums.

One way is the following (example assuming you want actor 1 chosen 3 times more chance than the other two):

Change Attribute Rand to (random(1,5)

When -- set to Any -- Rand = 1 or Rand = 4 or Rand = 5
Spawn Actor 1

When Rand = 2
Spawn Actor 2

When Rand = 3
Spawn Actor 3

""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

• Member Posts: 13

Thanks a lot bro,
helped a lot!:)

• I am here.Member, Sous Chef, PRO Posts: 6,577

You're welcome; glad it did.

""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps