Spawn in other layer OR actor follow player ?

JamieOneilJamieOneil Member Posts: 877
edited November -1 in Working with GS (Mac)
How can i spawn my actors in another layer ? if not possible then..

I have an actor at the top right corner, and a player that has a camera control, how can i make it so that when the player moves up (jumping on platforms) the spawner moves up too ?
If you need more info jsut ask.

JamieOneil

Comments

  • JamieOneilJamieOneil Member Posts: 877
    uptimistik said:
    Hey, try your best to stay away from the Spawner. Recycle actors as much as possible.

    The persons with more knowledge can help you out some more here. But this is my take on it.

    Sounds like you need a constrain attribute. Constrain the movement of the camera to the player. That way, wherever the player goes, the camera will follow.

    its not possible to recycle on the app im doing..
    I don't think you understand, i have the player moving. its the actor, or, 'spawner' that i want to move UP the screen with the actor?
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    put your spawner in un-scrollable an layer.

    Also no you cannot spawn into another layer other than having a spawner in the other layer that spawns based on an attribute triggering the spawn. I'm guessing thats what is you have going on now. Although you may have to do something like constrain self.position.y to self.start.y+scene.camera.origin.y and leave the layer scrollable. Cause anything you spawn in an un-scrollable layer will also not be affected by the camera movement.
  • PhoticsPhotics Member Posts: 4,172
    With the current version of GameSalad, you can't move actors out of layers. You can quickly delete them and respawn them in new layers... so you might need more spawners - one for each layer group that needs it.

    Difficult, cumbersome, but I'm thinking it might be possible. The trick is keeping the game optimized so that the player doesn't notice the switching... and carrying any necessary data between respawned actors.
Sign In or Register to comment.