How do you spawn multiple actors moving in the same direction using a table

TyDietrichTyDietrich Member Posts: 45
edited April 2013 in Working with GS (Mac)
I have one enemy actor and i want him to appear in multiple locations on my map. At each location I want the enemy to move up. I tried adding a timer with multiple spawn actors in it but this slowed down my game until it would crash. Is there anyway I could use a table to add the multiple x and y coordinates and spawn my enemies according to those coordinates?

Best Answer

Answers

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    [The Tech Support subforum is for technical issues with Creator or other GameSalad tools. I've moved this to the proper subforum.]

    Sure. A timer with spawn actor behaviors should work. How many enemies are you spawning and how often?

    Tables are also a nice way to go. Check out my demo and see if it's helpful: http://forums.gamesalad.com/discussion/comment/383521/#Comment_383521

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

  • TyDietrichTyDietrich Member Posts: 45
    I'm trying to spawn 24 enemies, I want them to spawn every 10 seconds. When i try using a timer with spawn actor behaviors, after about 3 spawn the enemies start multiplying and spawning more and more enemies with each spawn. After a minute or two of this the application begins to crash. I tried using the link you provided but my enemies never spawned in the locations that i inputed in the table. I placed the actors on the map and found their x and y coordinates, but they never appeared on the map. Also i wasn't sure if the boolean column was needed in the table for what i am trying to accomplish.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    If the enemies are increasing their spawn rate then you set it up incorrectly. You shouldn't have a spawn behavior in the enemy actor but rather in a separate "spawner" actor.

    I'll see if I can make you a quick demo.

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

  • TyDietrichTyDietrich Member Posts: 45
    Thank You, You are Awesome!
Sign In or Register to comment.