Spawn actors to fill Y axis...

I'm trying to find a way to spawn actors all along one side of another actor. I have wall and want it to be covered by weeds, for example, all along right side of the wall and from the top to the bottom of the Y axis.

What I have now is:

Wall actor spawns weed actor with a position of self.Position.X+25 (the +25 places the weed actor to the right of the wall actor) and random(1024,0) for the Y. That works but only spawns one weed actor. What I want is to spawn X number of weed actors along the wall randomly.

Make sense? I'll keep plugging away, but if anyone has an idea it would be most welcome.

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    edited March 2015

    In the wall actor, make an integer attribute 'A'

    Rule when A < 20
    --Timer every 0 seconds
    ----Spawn weed X=25 / Y=random (0,1024)
    ----Change A to A +1

  • pauljaappdevpauljaappdev Member Posts: 10

    Thanks, Socks. I'll give this a go.

Sign In or Register to comment.