Actor spawns and controls camera

Selected_FocusSelected_Focus Member Posts: 13
edited November -1 in Working with GS (Mac)
I'm having a problem with my camera controls. Everything was fine until i realized that my character needed to spawn to come back to life. I'm doing a side scrolling game. The main actor is to control the camera. I have the 'control camera' behavior in the original actor. But when I spawn the actor, it doesn't work. Any ideas what might be going on?

Comments

  • jstrahanjstrahan Member Posts: 498
    Why are you destroying the actor
  • Selected_FocusSelected_Focus Member Posts: 13
    destroying the actor because he dies, and needs to restart without resetting the scene.
  • Selected_FocusSelected_Focus Member Posts: 13
    anyone have ideas? Basically it's like Mario brothers. Anytime mario moves the camera follows him. When he dies, he spawns and camera follows. Is it not possible to have a camera follow on a spawn actor?
  • forkliftforklift Member Posts: 386
    Destroying the actor removes ALL instances of the actor from a scene in GameSalad. It's best not to use the destroy function on a player, even if he dies. Instead, you'll want to temporarily move the player off screen when he's 'destroyed/dead/etc' and have his X,Y coordinates move back to the 'spawn' position when he's returned to the game (extra lives).
  • Selected_FocusSelected_Focus Member Posts: 13
    I figured out the problem. The problem was with the my actor was spawning onto a layer that was not "scrolling". So, for everyone else, when you have a camera on a spawned actor, make sure it's spawning on the correct layer.
  • alialashwakalialashwak Member Posts: 5
    try to make warps search for a tutorial
Sign In or Register to comment.