Camera Panning

leodaguy

  • *
  • Posts: 85
Hello all,
I have always stayed near actor/scene events when making my games, but have never really gotten into making behaviors to use with my games. Since there was truly no easy way to pan the camera in Stencyl, instead of using cameras following actors that are sliding or making the camera go to a position defined by attributes, I have made a block and an actor that do it all for you. Here's what you do to get it up and running:
1. Import the attached behaviors into your game.
2. Place the Camera actor somewhere in your scene.
3. Go into your scene's events, got to the Custom category, drag in the GLOBAL PanCamera block, and attach it to an event.
4. You're done!
You can edit the Camera actor and the behavior if you want. Make sure nothing else is being followed by the camera, or else the other actor that is being followed will override the Camera actor's follow events.
Have fun! This is my first behavior, I might make more depending on what I want to do with my games.
NINJA EDIT: The GLOBAL PanCamera behavior apparently is set to strong out by default since I was testing different slide effects with it. Set it to something else by editing the behavior events if you don't want it like that.
ANOTHER NINJA EDIT: Things almost went right with the entire behavior. The only thing is, the Camera events did not make it through. I have posted a screenshot of what the events should be, so replicate them in your Camera actor!

« Last Edit: February 08, 2014, 08:12:48 am by leodaguy »
My website will return "shortly"
("Shortly" meaning "in several months or so")

gamegirlxl

  • Posts: 716
I think that you should put the hide block inside a when created wrapper because you really need it to happen only once.