Random spawn actor

ForteForte Member, PRO Posts: 297
edited November -1 in Working with GS (Mac)
Hi everyone,

How do i make an actor randomly spawn a actor? e.g. when the actor is killed, by a chance, it leaves a powerup behind

Cheers, Dragokillz

Comments

  • firemaplegamesfiremaplegames Member Posts: 3,211
    Integer self.niceness = 20
    Integer self.chanceOfDroppingAnItem

    Rule
    When (whatever kills the actor)
    -----Change Attribute: self.chanceOfDroppingAnItem To: random(1,100)
    -----Rule
    -----When self.chanceOfDroppingAnItem <= self.niceness
    ----------Spawn Item
    -----Timer After 0.1
    ----------Destroy Actor
  • ForteForte Member, PRO Posts: 297
    Ah ok thanks Fire Maple Games.

    P.S. I bought your iphone app Danger Cats. It is very good!
Sign In or Register to comment.