Spawn actors in different layers than the spawner

architectpianistarchitectpianist Member Posts: 21
edited November -1 in Working with GS (Mac)
Hi,
In my game, the user taps the screen to create a random pentomino. The background is scrollable, separate from the spawner. When the spawner is in the scrollable layer, the tap stops working outside the 1024 x 768 pixel limit. When it's in the non-scrollable layer, the pentominoes don't move either. Is there any way to have the spawner in the non-scrolling layer spawn pentominoes into the scrollable layer?

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    you could use a boolean game attribute that is set to true when you touch your spawner and then in you background layer have an invisible attribute that spawns an actor and then turns the boolean back to false when that boolean is true
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    I like tenrdrmer's idea of spawner "passing the buck". Another idea would be not to spawn at all, and have the pieces you want out of sight already on screen, in their proper layer, just get them moved into position when needed. :-)

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    gyroscope said:
    I like tenrdrmer's idea of spawner "passing the buck". Another idea would be not to spawn at all, and have the pieces you want out of sight already on screen, in their proper layer, just get them moved into position when needed. :-)

    123
Sign In or Register to comment.