How to make actors spawn randomly
J_gorinac
Member Posts: 33
Im making a game thats pretty much like wack a mole but with my friends head poping up instead lol but i have no clue on how to make his head pop up from the wholes randomly and to make it difficult
Pls help
thanks
Pls help
thanks
Comments
Make an integer attribute - call it 'popup' or whatever you like.
Then have an actor in your scene as a controller.
Have a timer behaviour in this actor
Say 'every 3 seconds'
Behaviour: Change popup to random(1,6)
Then have six new rules.
If popup = 1
Make first mole pop-up
If popup = 2
Make second mole pop-up
etc etc
You can even use random in the timer, so for example:
Every Random(1,4) seconds
Change pop-up to Random(1,6)
The first number is the lowest, the second the highest and together they stipulate a range to draw a random number from.
Hope that helps!
QS
Good luck with your game. Hope you and your friend enjoy it.
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io