 |
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
Inspiration Anti-Protagonist

Joined: 30 Oct 2006 Posts: 74 Location: Kool-Aid
|
Posted: Thu Jul 26, 2007 7:32 am Post subject: Side Scrolling Problems |
|
|
Um, yeah.
I copied a large chunk of the Moglery's 3-framed walking script and basically
replaced the walk-up part with jump-up, which pretty much goes like:
Code: | #Jump Up!
if(key is pressed (72))
then(
set tag (2, on)
set variable (directional, herodirection(me))
set hero picture (me, 4)
walk hero (me, up, 3)
set hero direction (me, directional)
wait for hero (me)
walk hero (me, down, 3)
set hero direction (me, directional)
wait for hero (me)
set tag (2, off)
wait(1)
set hero picture (me, 1)
end |
Now, I wanted to be able to move sideways while I'm in the air, so I added the tags to check for that.
My first idea was to make the sideways-movement script something like:
Code: | script, each step, begin
#JUMPING
while (checktag(2)==on)
do(
if(keyispressed(77))
then(
walk hero (me, right, 1)
wait for hero (me)
set variable (directional, right)
)
if(keyispressed(75))
then(
walkhero(me,left,1)
waitforhero(me)
set variable (directional, left)
)
)
end |
I thought that the hero would continue to rise/fall as the each-step script is on, but apparently it doesn't.
Now I'm out of ideas.
I tried to get a few from the wiki's list of side-scrollers, but the only scripts that were included with the games was from Baby Bob and the Sonic Demo (Both of which were too scary for me to attempt to analyze).
Help, please? _________________ Look back and you've already lost.
Look forward and embrace the trials of tomorrow. |
|
Back to top |
|
 |
Ysoft_Entertainment VB Programmer

Joined: 23 Sep 2003 Posts: 810 Location: Wherever There is a good game.
|
Posted: Thu Jul 26, 2007 10:25 am Post subject: |
|
|
ok, first of all, you need to put the moving script inside the part where hero jumps up/down.
right now, all your jumping does is
go up 3
wait for hero
go down 3
it needs to be something like this
go up 1
check if right/left key is pressed
if it is, go to that direction
repeat 3 times
do the same for walking down.
Hope this helps somehow.
check this game out. It doesn't use baby bob's script(although it is somewhat based on it) . I would provide the source for the code, but I lost it.
It does however do what I described above. _________________ Try my OHR exporter/importer.
OHRGFX
Striving to become better pixel artist then Fenrir Lunaris. Unfortunately the laziness gets in the way of my goals. |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Thu Jul 26, 2007 10:53 am Post subject: Re: Side Scrolling Problems |
|
|
Inspiration wrote: | Now I'm out of ideas.
I tried to get a few from the wiki's list of side-scrollers, but the only scripts that were included with the games was from Baby Bob and the Sonic Demo (Both of which were too scary for me to attempt to analyze).
Help, please? |
Those scripts are scary simply because making a side-scroller *is* complicated. You won't be able to do it right without a complicated script.
You probably don't want to be using "walk hero" at all. Walk hero is strictly tile-based movement and it is (almost) impossible to do pixel-based movement with it.
However, if tile-based movement is okay with you, try Ysoft's suggestion. |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Thu Jul 26, 2007 11:11 am Post subject: Re: Side Scrolling Problems |
|
|
James Paige wrote: | Walk hero is strictly tile-based movement and it is (almost) impossible to do pixel-based movement with it. |
The "almost" only makes it in there because of Metamorphosis and Siv, which I believe are the only two games to seriously attempt that. It's really not worth it. _________________
|
|
Back to top |
|
 |
Inspiration Anti-Protagonist

Joined: 30 Oct 2006 Posts: 74 Location: Kool-Aid
|
Posted: Thu Jul 26, 2007 12:46 pm Post subject: |
|
|
Mm.
I thought I had a pretty good concept for a side-scroller last night, but I don't think it's worth that much work.
If I ever make a side-scroller, I'd probably follow Ysoft's plan.
Thanks, guys. _________________ Look back and you've already lost.
Look forward and embrace the trials of tomorrow. |
|
Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|