Can't spawn more than 2 actors on the iDevices
TouchTiltGames
Member Posts: 1,162
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
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
not sure what you mean. GS viewer is the app that you install with Xcode. iDevices?
http://gamesalad.com/forums/topic.php?id=3141#post-17785
Not sure what is causing the problem in the original post. sorry
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