Random Actor type spawn
Forte
Member, PRO Posts: 297
Hello everyone,
Who has a good line of code that will choose between certain actors and spawn them by their own choice?
Cheers, Dragokillz
Who has a good line of code that will choose between certain actors and spawn them by their own choice?
Cheers, Dragokillz
Comments
And a Change Attribute behavior and a Rule, like this:
Change Attribute: self.randomNumber To: random(1, [total number of actors])
Rule
When all conditions are valid:
self.randomNumber = 1
-----Spawn Actor: [actor 1]
otherwise
-----Rule
-----When all conditions are valid:
-----self.randomNumber = 2
----------Spawn Actor: [actor 2]
-----otherwise
----------Rule
----------When all conditions are valid:
----------self.randomNumber = 3
---------------Spawn Actor: [actor 3]
etc., etc...