Version: 3
Introduction
The Camera Pan System allows you, the player, or creator to scroll through your map with the press of a button and arrow keys.
Features
- Allows the player to scroll through the map no problem.
- (NEW!) The camera no longer returns to you by teleport. Instead, it returns to you by camera pan.
- (NEW!) Don't like holding down the Q button? Now you have the option to either hold the Q button to activate the camera pan (hold) or tap the Q button to activate and tap again to deactivate it (toggle).
- (NEW!) This is a feature that many members have requested time and time again and it's something I've never got around doing. You, now have the ability to limit how far you want the camera to pan! How's that?
http://img360.imageshack.us/img360/3382/cpcs1ve3.png[/IMG]
Standing there...
http://img379.imageshack.us/img379/7882/cpcs2kt0.png[/IMG]
Moving the camera around.
http://img379.imageshack.us/img379/332/cpcs3kh3.png[/IMG]
Camera returning to me. (Although you may not see that happening since the picture's not in motion of course, that's what is happening.)
Demo
It's a bit complex so I'll have it up for download. Read the bulletin for more details on how to use this system in the demo.
Download Here!
System
6 Common Events
2 Switches
3 Variables
2 Switches
3 Variables
1: Player Screen X (Keeping track of Player Screen X coordinate.)
2: Player Screen Y (Keeping track of Player Screen Y coordinate.)
3: Hold or Toggle (It's better than using some switch to do this imo.)
2: Player Screen Y (Keeping track of Player Screen Y coordinate.)
3: Hold or Toggle (It's better than using some switch to do this imo.)
1: Camera Pan Control System (The trigger switch for all common events of this event system)
2: Camera Panning (Meant for camera pan.)
2: Camera Panning (Meant for camera pan.)
This common event keeps track of the player's screen coordinates.
Trigger: Parallel
Switch: Camera Pan Control System
---------------------------------------------------------------
Trigger: Parallel
Switch: Camera Pan Control System
---------------------------------------------------------------
Code:
@>Control Variables: [Player Screen X] = Player's Screen X
@>Control Variables: [Player Screen Y] = Player's Screen Y
Trigger: Parallel
Switch: Same as above.
------------------------------------------------------
Switch: Same as above.
------------------------------------------------------
Code:
@>Conditional Branch: Variable: [Hold or Toggle] == 0
@@>Conditional Branch: Script: Input.press?(Input::L)
@@@>Control Switches: [Camera Panning] = ON
@@>Else
@@@>Control Switches: [Camera Panning] = OFF
@@>Branch End
@>Branch End
@>Conditional Branch: Variable: [Hold or Toggle] == 1
@@>Conditional Branch: Script: Input.trigger?(Input::L)
@@@>Conditional Branch: Switch: [Camera Panning] == ON
@@@@>Control Switches: [Camera Panning] = OFF
@@@>Else
@@@@>Conditional Branch: Switch: [Camera Panning] == OFF
@@@@@>Control Switches: [Camera Panning] = ON
@@@@>Branch End
@@@>Branch End
@@>Branch End
@>Branch End
Trigger and switch: Same as above.
Code:
@>Conditional Branch: Switch: [Camera Panning] == ON
@@>Set Move Route: Player: Wait 1 Frames
@>Else
@>Branch End
Trigger and switch, same as above
Code:
@>Conditional Branch: Switch [Camera Panning] == ON
@@>Conditional Branch: Script: Input.press?(Input::LEFT)
@@@> Scroll Map: Direction Left, Space 1, Speed 5
@@>Branch End
@@>Conditional Branch: Script: Input.press?(Input::RIGHT)
@@@> Scroll Map: Direction Right, Space 1, Speed 5
@@>Branch End
@@>Conditional Branch: Script: Input.press?(Input::UP)
@@@> Scroll Map: Direction Up, Space 1, Speed 5
@@>Branch End
@@>Conditional Branch: Script: Input.press?(Input::DOWN)
@@@> Scroll Map: Direction Down, Space 1, Speed 5
@@>Branch End
@>Branch End
@>Conditional Branch: Switch: [Camera Panning] == OFF
@@>Conditional Branch: Variable: [Player Screen X] <= 300
@@@>Scroll Map: Direction Left, Space 1, Speed 6
@@>Else
@@@>Conditional Branch: Variable: [Player Screen X] >= 340
@@@@>Scroll Map: Direction Right, Space 1, Speed 6
@@@>Else
@@@@>Conditional Branch: Variable: [Player Screen Y] <= 220
@@@@@>Scroll Map: Direction Up, Space 1, Speed 6
@@@@>Else
@@@@@>Conditional Branch: Variable: [Player Screen Y] >= 260
@@@@@@>Scroll Map: Direction Down, Space 1, Speed 6
@@@@@>Branch End
@@@@>Branch End
@@@>Branch End
@@>Branch End
@>Branch End
A feature members have requested for a long time. Check it out!
Code:
@>Conditional Branch: Switch: [Camera Panning] == ON
@@>Conditional Branch: Variable: [Player Screen X] <= 0
@@@>Scroll Map: Left, 1, 6
@@>Branch End
@@>Conditional Branch: Variable: [Player Screen X] >= 800
@@@>Scroll Map: Right, 1, 6
@@>Branch End
@@>Conditional Branch: Variable: [Player Screen Y] <= 0
@@@>Scroll Map: Up, 1, 6
@@>Branch End
@@>Conditional Branch: Variable: [Player Screen Y] >= 600
@@@>Scroll Map: Down, 1, 6
@@>Branch End
@>Branch End
Code:
@>Conditional Branch: Switch: [Camera Panning] = ON
@@>Show Picture: 'arrows.png' Upper Left, (0,0)
@>Else
@@>Erase Picture
@>Branch End
Instructions
Download this image below!
http://img357.imageshack.us/img357/2554/arrowsgu5.png[/IMG]
FAQ
If you are looking for support for this event system then ask away in this thread or view the PunkBoards located within my profile.
Credits and Thanks
Twilight, Q-Man, Use-t1337dude, Dorito, and ParkAvenger for putting their thoughts into this.
Terms and Conditions
Just credit Punk. :thumb: