Multiple Actor Spawn

BrundiBrundi Member Posts: 60

Hi, this questing is going to sound very dumb but here it goes

Is there a way to instantly spawn multiple actors in a line like this:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (but squares)

Across a 5000 width screen almost touching each other

Thank you for all your answers, Brandon

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited March 2014

    Place a spawner actor at the right edge of the scene. Then add these rules:

    Spawner actor
    Timer every 0.3 seconds spawn actor [actor name]

    Spawned actor

    Move direction [180] speed [200]

    If you adjust the timer duration and the speed, you should be able to get it working the way you want it.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • BrundiBrundi Member Posts: 60
    edited March 2014

    yes, but I just want them to spawn in there positions and not move

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited March 2014

    Ah, okay. So more like spawning tiles for a background. You can use a loop to do this, where you move the spawning actor the width of a spawned actor plus a little more (so if your tile actors are 30 pixels wide, you would move the spawner 34 pixels, say, and then continue spawning).

    I have a Study of Loops demo that offers a few ways to loop. http://forums.gamesalad.com/discussion/comment/381275/#Comment_381275. A much easier solution is to use the Release Candidate of Creator (http://forums.gamesalad.com/discussion/66101/release-candidate-0-11-0-2-is-available/p1), which includes a Loop behavior. For now, it's only available for Mac, though.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • BrundiBrundi Member Posts: 60

    Im using a windows machine

  • hbprophhbproph Member Posts: 1

    me to

  • BrundiBrundi Member Posts: 60
    edited March 2014

    I found a way

    In the first actors PROTOTYPE put spawn actor in the detection you want

    Then make an Boolean attribute called "actor spawn"

    When you want it to stop but another actor in the place you want it to stop and say when actor overlaps or collides with the second actor set the Boolean attribute to false

    It might lag a bit at first but it works!

Sign In or Register to comment.