Spawn Actor every 2 seconds with Timer. Help!

MLCinemaMLCinema Member Posts: 133
edited November -1 in Working with GS (Mac)
Hello All,

I am trying to spawn an actor every 2 seconds, but it seems to not be working. I have a timer (every 2 seconds - spawn actor, actor 2).

It only spawns one actor. Is this not how to accomplish this?

Thank you.

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi MLCinema, have you put an actual x and y coordinates into the Spawn behaviour? If so, it will be spawning an actor every 2 seconds as you want but overlaid on the previous ones, so you'll never see a new one!

    I've just done a small test, 2 actors, first actor acting as the trigger button to spawn the 2nd actor; rules in first actor:

    When actor receives event touch is released

    Timer Every 2 seconds

    Spawn Actor 2
    Position random(0,480) random(0,360) Relative to scene.

    you'll be able to amend this to your own needs, I'm certain (i.e you might not have a button to trigger this for example). Hope that helps you. :-)
  • MLCinemaMLCinema Member Posts: 133
    Hello, still no luck. This is what i am trying to accomplish. I have an actor in the middle of the scene. In the far left corner i have an actor that should spawn another actor every two seconds that will move towards the actor in the middle of the scene. The actor will spawn once, but that's it. I must be doing something wrong.

    Is the actor spawning in the same place as the one before it? I want a bunch of actors to spawn and move towards the middle actor.

    Thank you all again.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi MLCinema, I'm about to upload a small test based on your description; hope it helps. I'll give you the link as soon as I can.

    Edit: here's the link: http://gamesalad.com/game/6267?GSCVersion=0.9.0&tokenUsername=gyroscope&token=21bda8575518435895927d85d28c4aa6846e98828c65a3c4a545676c26bc13f5

    I ticked the box for sharing/downloading but there's no download button showing for some reason. If this is what you're after, perhaps drop me a line at spidergriffin@tiscali.co.uk and I'll send you the file.
  • MLCinemaMLCinema Member Posts: 133
    gyroscope said:
    Hi MLCinema, I'm about to upload a small test based on your description; hope it helps. I'll give you the link as soon as I can.

    Edit: here's the link: http://gamesalad.com/game/6267?GSCVersion=0.9.0&tokenUsername=gyroscope&token=21bda8575518435895927d85d28c4aa6846e98828c65a3c4a545676c26bc13f5

    Great! Thank you. I will check this out asap.
    I ticked the box for sharing/downloading but there's no download button showing for some reason. If this is what you're after, perhaps drop me a line at spidergriffin@tiscali.co.uk and I'll send you the file.

  • MLCinemaMLCinema Member Posts: 133
    gyroscope said:
    Hi MLCinema, I'm about to upload a small test based on your description; hope it helps. I'll give you the link as soon as I can.

    Edit: here's the link: http://gamesalad.com/game/6267?GSCVersion=0.9.0&tokenUsername=gyroscope&token=21bda8575518435895927d85d28c4aa6846e98828c65a3c4a545676c26bc13f5

    I ticked the box for sharing/downloading but there's no download button showing for some reason. If this is what you're after, perhaps drop me a line at spidergriffin@tiscali.co.uk and I'll send you the file.

    YES! This is it. I don't know what I'm doing wrong.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi MLCinema, drop me a line at the address above if you like, and I'll send you the game file. :-)

    Edit: got your email; sending file now.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    Hi MLC; you're other prob concerning random spawning from 4 corners, I've done a test and uploaded it for you. Yet again, despite clicking for it to be downloadable/shareable, there's no download button.

    Here's the link anyway:

    http://gamesalad.com/game/6359?GSCVersion=0.9.0&tokenUsername=gyroscope&token=a5a67008e1099566d44d725ec902bdde906f968ef99d1190659baac05daefc83

    I'll email the game file to you now. And if anyone else wants this game file, please email to the address given above and I'll send you a copy as well.

    :-)

    Edit: added: don't forget to add Destroy in the 4 spawned actors when they've reached the middle, or you'll get a bit of a clog-up! (forgot to do this in the file I sent).
Sign In or Register to comment.