Home
Help
Search
Calendar
Login
Register
Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Click here to join us on IRC (#charas on irc.freenode.net)!
Charas-Project
»
Game Creation
»
Requests
»
Tutorials
»
Panning or Scrolling Around the Screen
« previous
next »
Print
Pages: [
1
]
Author
Topic: Panning or Scrolling Around the Screen (Read 1907 times)
clockworkroutine
Waiting for Godot
Associate
Posts: 100
Panning or Scrolling Around the Screen
«
on:
January 05, 2007, 11:07:23 PM »
So currently I'm making a TBS...I believe, well it does have the point-click-move system like other TBS, I have been thinking about just using it to just move around like that of a computer game...Anyways let me get to the point when I stumbled onto this idea.
I'd move to a spot on the screen far away from the hero, and I clicked. The hero would move but I could not see him move until he entered the screen. So I devised a panning and scrolling method so I can see else where.
You can put this in whatever game you want, you can use it as a second sight ability or something else really geeky.
You can start it however you like, whether it be on by entering a lighthouse to servey the land or you are holding down a button that allows for panning to turn on. The latter is the one that I will describe because I use it.
Code:
Label 1.
Have a key input set to shift or something besides the directional keys. I'll say 5 for enter, don't use it use shift.
condition if key input is 5 (Put Else Case):
Key input (check Up, Down, Left, Right)
condition if key equals 1:
(go to Pan Screen option) (Bare with me I'm not at my own computer) go to the option that makes everything available.
Check the down direction, and make it move 1 tile, and set the speed to anything you want.
And now theres a box that see halt other processes during transitions check that too.
Now put in jump to label 1.
Now make a condition for all the other directions.
The else case would be return to origin in the Pan Screen Option.
Done. And I'm sorry if your dumb and I'm sorry that I'm dumb at explaining or that I'm just lazy.
I want to take back making this tutorial, but I'll leave just because it can give people the idea to adding this feature to there game to enhance play.
(NOTE: if you did make what I just said, the map you have has to loop around, or scrolling will act funny. I combated this problem by making the map really large and suspending the land of play in the center. If I look into this more I'm sure you can use variables in a way to limit how far you can move the screen.)
Logged
Meiscool-2
Sage
Posts: 7,030
If you support n00bs, you support communism.
(No subject)
«
Reply #1 on:
January 06, 2007, 12:08:21 AM »
Sorry, but there are a lot of errors with this. One big one, is if you press left 45 times on a 30X30 map, you'll have to press right 45 times to get back, even though the map didn't actually scroll through 45 spaces. There should also be a limit as to how far you can scroll. That would probally use hero screen X and Y cords.
Logged
Most Recent:
________________________
Old Stuff:
Print
Pages: [
1
]
« previous
next »
Charas-Project
»
Game Creation
»
Requests
»
Tutorials
»
Panning or Scrolling Around the Screen