Can't spawn more than 2 actors on the iDevices

TouchTiltGamesTouchTiltGames Member Posts: 1,162
edited November -1 in Working with GS (Mac)
Kinda pulling my hair out over this one:

I've got 3 actors right now lined up and when you touch and drag them out they're spawned from that point endlessly. All 3 work fine in the Gamesalad Viewer, but not on the iDevices. I'm using 'When touch is pressed'....It seems as though I can only spawn 2 of the 3 actors at any time on the iDevices, but again, this is not a problem in the Viewer. When I try and spawn a 3rd actor, it only spawns once.

Anyone ever have a similar issue?

cheers,
shane

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    viewer? iDevices?

    not sure what you mean. GS viewer is the app that you install with Xcode. iDevices?
  • TouchTiltGamesTouchTiltGames Member Posts: 1,162
    Aight sorry mybad...By Viewer I meant Preview mode and iDevices = iPad/iPhone :)
  • TouchTiltGamesTouchTiltGames Member Posts: 1,162
    I'm wondering if my spawning issue is related to the latest update. Found this thread, but I'm not using a change scene:

    http://gamesalad.com/forums/topic.php?id=3141#post-17785
  • Koda89Koda89 Member Posts: 275
    scitunes said:
    viewer? iDevices?

    not sure what you mean. GS viewer is the app that you install with Xcode. iDevices?

    iDevices is the universal nickname for the iPhone, iPod Touch, and iPad. Much quicker to say you are making a game for the iDevices than it is to say your are making a game for the iPhone, iPod Touch, and iPad. :P
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    yes I know that, but viewer usually refers to the GS viewer app and not the preview within GS creator. That's what confused me.

    Not sure what is causing the problem in the original post. sorry :(
  • TouchTiltGamesTouchTiltGames Member Posts: 1,162
    Yeah its weird...I can spawn actors from a spawn point in the Viewer but on the iPad only 2 of the 3 will work.
  • jmp909jmp909 Member Posts: 73
    i dont think you want to spawn actors anyway... its a resource/performance hog. read around the forum about this. keep however many actors you need offscreen and move them onto screen when needed. (each actor can be assigned it's own ID at the beginning of your scene, so you can use this to keep track of when it can be spawned)

    eg

    scene: game.id = 1

    actor: self.id = game.id, game.id=game.id +1

    each actor as it is added to the scene internally will get it's own ID value

    you can then presumably keep track of a spawn ID to cycle through the actors eg game.nextSpawnID = (game.nextSpawnID + 1)%game.maxSpawnID

    and then per actor:

    if(self.id = game.nextSpawnID) .. do something

    something like that, i'm typing out untested code but the concept should work
Sign In or Register to comment.