2 different enemy images?
ChirpinGames
Member, PRO Posts: 214
Hey all, just wondering if its possible to have an enemy spawner that after 4 secs randomly spawns one of two different images?
Comments
Have a timer - as you suggested.
Make an attribute - say 'Random Spawn'.
When timer goes off
Change attribute Random Spawn to Random (1,2)
Then have a rule
If attrubute Random Spawn = 1, then spawn actor type 1
If attribute Random Spawn = 2, then spawn actor type 2
That should do it.
Hope that helps,
QS
Dr. Sam Beckett never returned home...
Twitter: https://twitter.com/Quantum_Sheep
Web: https://quantumsheep.itch.io
I can only set true or false if I make a rule with attributes.
You use it like this:
Change Attribute
self.myRandomImage to random(1,totalNumberofImages)
Then some Rules like this:
Rule
When self.myRandomImage = 1
Change Image To image1.png
Rule
When self.myRandomImage = 2
Change Image To image2.png
etc...
Hope this helps!
Joe
To be honest, I used this for spawning bonuses after a collision, but it works fine.
When actor X collides with actor Y, actor Y drops a random bonus from a set of 3 possible bonuses.
Works like a charm.