Off-scene "spawner" of multiple actors?

IgnisIgnis Member Posts: 72
edited November -1 in Working with GS (Mac)
Thanks to Joe's recent help/suggestion about digging past the "lock" for actor instances (in order to access more specific attributes), I have made a slight bit of progress...

BUT... the next challenge! Can somebody explain how to create an off-scene "spawner" functionality that doesn't use Spawn Actor? You see, because I need my actors to interact with each other on the instance-level basis, I can't use the normal spawn function. Likewise, since I don't want all of these actors to be visible in the scene initially, I can't just dump them into the visible portion of the scene.

What I need is to keep them slightly off-scene, initially, and then move them into place one at a time. This is the logic I'm having trouble with. Let's take the example of a basic pinball game. You start with 3 balls, but you can only release one at a time, per the rules of pinball. I basically want to keep the 3 balls in a "queue" off-scene, and when summoned, I want to take the next ball and introduce it into the scene by moving its X/Y position. I just don't know how to use scene-level rules and variables to "spawn" the next ball which resides off-scene.

There's probably a fairly simple way to accomplish this, and as I often do, I'm turning to the expertise of those who have been using GameSalad for longer or who have implemented this kind of scenario already. As always, thanks in advance!

Comments

  • chosenonestudioschosenonestudios Member Posts: 1,714
    Basically what you can do is this:

    Put your other pinballs where there going to need to be from the beginning and just set there alpha at 0 and when you need them just change their alpha back to 1...

    Yea this is the preferred method over spawning especially with very few actors because it doesn't hit the processor as much...

    Good Luck!

    Edit: or you could put them off the screen and then when you need them just use the move to attribute, but if you don't want it to look bad you'd have to use that in conjunction with the alpha... soooo... its better just to do the first one.. unless for whatever reason you need them off the screen, but in general you wouldn't and you could just counteract the effect with a boolean soo yeah....... wow I just rambled alot! sorry I'm going to stop now haha
  • iPhoneDevForMeiPhoneDevForMe Member Posts: 362
    You could make the scene larger than 320 x 480 by changing the height and width in the scene attributes. Your viewing area will still be the iPhone screen size, but you will have all of the extra room around it that will not be view by anyone playing the game.

    Place all of your actors in this area. You could then use interpolate to move the actors where you would like them to be.

    You could also set their alpha to 0, thus making them invisible. When you move the actor to its desired position, then set the alpha to 1.

    Now all actors will be "Pre-Spawned" and you can let them "talk" to each other! Hope this helps!

    -Kyle
Sign In or Register to comment.