More than one Control Camera not working right.

SAMmanSAMman Member Posts: 228
edited November -1 in Working with GS (Mac)
Hey all, I am trying to get an actor to control the camera to pan around the screen to show the entire level in my game and then when it has finished give control to another actor that you actually play the game with. I have it set up so that when the level starts the camera control follows the first actor by moving to the edge of the screen and then move to it's original position and destroying itself. So far that part works but camera control does not go back to the other actor after that. I checked out the forum on the subject and tried some solutions to a pinball game but I must still be doing something wrong. Any ideas? Thanks!
SM

Comments

  • quantumsheepquantumsheep Member Posts: 8,188
    How are you switching control to the other actor?

    I'd have an attribute that defines the state. Let's call it 'FollowMe' and make it a boolean.

    Just before you destroy the first actor, put in a 'change attribute' behaviour and make FollowMe = true.
    Put the destroy behaviour in *After* that.

    Then in your (I assume 'player') actor, have a rule that says 'If attribute 'FollowMe' is true:

    Put in your camera control

    That *should* do it... hope it helps!

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • SAMmanSAMman Member Posts: 228
    That worked great! Thanks for the tip QS, I keep forgetting to reset my attributes. Random question, I have a lot of actors set up to do different things and not interact with the user directly, does that take more memory and will that slow down the game? Thanks.
    SM
  • quantumsheepquantumsheep Member Posts: 8,188
    If you mean 'control' actors, I'd get the number down to 1 if you can - the more actors on-screen, the more the game has to load.

    I kinda get why you'd want a few just to keep things organised and easy to find e.g. one control actor for the player, one for a diff. enemy type etc etc - but I've found just one with 'groups' of commands pertaining to what you want them to usually does the trick.

    Cheers, and glad the thingy worked for you :)

    QS :D

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

Sign In or Register to comment.