The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Tutorials and Eventing => Topic started by: magic2345 on February 11, 2007, 01:18:22 AM

Title: Jumping [RESOLVED(YEAH!)]
Post by: magic2345 on February 11, 2007, 01:18:22 AM
I'm making a forest using the sunny forest tileset. In the forest there is a river. But there is no tile for making a bridge! So, I used these water lilies for a stepping stone. But I messed up. Anyone here know how to do it so that when the player presses the action key, it jumped to the water lily.

Thanks,
Title: Re: Jumping
Post by: :) on February 11, 2007, 01:36:07 AM
use the set move route command in events
Title: Re: Jumping
Post by: magic2345 on February 11, 2007, 01:47:40 AM
I tried using that but when I jumped to the 1 lilypad and wanted to jump to the 2 lilypad and tried pressing the action key, nothing happens and I can't get out of the lily! Here is the code:

<>Conditional Branch: If Player sprite facing right
<>Move Event: Player
:           : Phasing On (so that the player can go through the lilypad
:           : Jump (+2,0)
:           : Phasing Off

Is there anything wrong with that?

Thanks,
Title: Re: Jumping
Post by: :) on February 11, 2007, 01:50:50 AM
post a screenshot of the page in event layer and lable where you want to jump/land
Title: Re: Jumping
Post by: magic2345 on February 11, 2007, 02:12:39 AM
I'm sorry but I can't put pics as I need to upload them and thats the same as downloading, the internet in my country is very expensive so I cant upload. Please, can you just tell me how to do it? I know I sound selfish but Please,

Thanks,
Title: Re: Jumping
Post by: :) on February 11, 2007, 02:14:31 AM
can you download a small demo I just made for you? it wil explain everthing easy, its added to this post download if you can, if not I will explain by words
Title: Re: Jumping
Post by: magic2345 on February 11, 2007, 02:47:49 AM
Hey, thanks! that explains everything! But whats the layer priority thing for? And when I landed on the ground (not the lily pad) on the left side, when I press right and then press space bar, the thing just stand there, I need to walk to left 1 square then walk right 1 square then jump. Any remedies for this?

Thanks for making the demo, but maybe you could use words now?

Thanks again,
Title: Re: Jumping
Post by: :) on February 11, 2007, 02:57:29 AM
weird, I had no problems at all going back to the right side landing and turning and jumping.

can someone else download demo and try it?
Title: Re: Jumping
Post by: magic2345 on February 11, 2007, 07:23:30 AM
Maybe its because I use PK? But can you tell me what the layer priority thing is for?

Thanks,
Title: Re: Jumping
Post by: :) on February 13, 2007, 04:24:02 AM
lost? what layer thing? XD
Title: Re: Jumping
Post by: Irock on February 13, 2007, 04:35:44 AM
weird, I had no problems at all going back to the right side landing and turning and jumping.

can someone else download demo and try it?
I downloaded it and tryed it. It works fine. I also have PK edition.
Title: Re: Jumping
Post by: :) on February 13, 2007, 04:52:57 AM
so it works then...magic, try it once more...
Title: Re: Jumping
Post by: Arkhan on February 13, 2007, 10:01:16 AM
The problem with this is that you can jump into unpassable terrain. How would you stop the player jumping into terrain he can't usually move in/out of?
Title: Re: Jumping
Post by: :) on February 13, 2007, 02:41:10 PM
on the terrain use an event and turn the switch off for jumping...anywas that demo only lets you jump at one time does anyone want a jump all the time demo?
Title: Re: Jumping
Post by: modern algebra on February 13, 2007, 09:28:50 PM
If you changed the passability of the lily pad to passable, then you could remove the part that turns through on and off in the event and just switch on in the move event "ignore if can't move". That way it'd only work if the place you are jumping to is passable terrain.

Sorry for interrupting the topic Nouman, I know you have it covered, but I just thought that that might help Arkhan.
Title: Re: Jumping
Post by: :) on February 13, 2007, 11:28:05 PM
Modern, no need to say sorry  :D
you are here to help as am I, all ideas are welcome.
Title: Re: Jumping
Post by: magic2345 on February 16, 2007, 11:26:53 PM
Nope, stil can't do it...Weird..Thanks though..Anyway, modern algebra, more explanations?

Thanks,
Title: Re: Jumping
Post by: modern algebra on February 17, 2007, 11:37:10 PM
I don't know how much I'll be able to help if you couldn't understand what Nouman did, but I'll try. The Player On Top thing that Nouman did was to make it more generally applicable I think, but in the case of the lilypads it won't make a difference. I'm not exactly sure what it is that you want. Do you want to be able to jump at any time? or just at certain areas? because that makes a bit of a difference in the ways you can event this. In any case, just tell me what you want, and I'll see if I can help a little more.

Quote
when I press right and then press space bar, the thing just stand there, I need to walk to left 1 square then walk right 1 square then jump. Any remedies for this?

This is after you've activated jumping? That's strange, because the event is set up so that the ability to jump is never really deactivated, however the reason that this might be occuring is because the Control Switch is inside the conditional branch, thus it will only activate if you approach the event from the left. Outting it under the conditional branch would change that. Anyway, post if you're having more trouble.
Title: Re: Jumping
Post by: :) on February 17, 2007, 11:41:23 PM
he only want's to be able to jump in that one spot not all over, thats why it should be set up so you cant jump at any given time only when you touch the event to jump onto the lily pads.
Title: Re: Jumping
Post by: magic2345 on February 18, 2007, 12:27:06 AM
What do you mean by outing it?
I followed what Nouman did
Code: [Select]
<>Conditional Branch: Player facing right
  <>Switch[997:Jumping]=ON
  <>message: Press Spacebar to jump
 :Else Handler
  <>Switch[997:Jumping]=OFF
Does outing it means to just erase the conditional branch and just turn on the jumping switch? I don't want the player to can jump all the time, I want it to just jump there...

Thanks,
Title: Re: Jumping
Post by: modern algebra on February 18, 2007, 12:45:07 AM
EDIT
What I meant by outting it was to place the control switch: 001 ON command outside the conditional branch in the event. This, as Nouman pointed out, would make it so that jumping would be available everywhere once you've stepped on the event, which you don't want, thus it would not work. Thus, just ignore that first post of mine.
END EDIT

This being the case, I'd prefer not to use a common event then, because as it is you can walk on to the event, then walk off of it and jumping wouldn't deactivate. I'd just use local events (Action Key activated) like this: (this only works if you set the lilypad to passable. If you have some reason for them not being passable, post and I'll rework it)

On the left bank
Code: [Select]
Conditional Branch: Player is facing Right
   Set Move Route: Player
       Jump (+2, +0)
Branch End  

On the right bank
Code: [Select]
Conditional Branch: Player is facing Left
   Set Move Route: Player
       Jump (-2, +0)
Branch End  

on the lilypads:
Code: [Select]
Conditional Branch: Player is facing Right
   Set Move Route: Player
       Jump (+2, +0)
Branch End  
Conditional Branch: Player is facing Left
   Set Move Route: Player
       Jump (-2, +0)
Branch End  

It probably looks confusing so I included a demo. It looks like it would be a lot of work because you would have to put events like this everywhere you want to be able to jump, but it's just copying and pasting. Plus it removes the necessity to conditionalize if the player decides not to jump after he approaches the place where he can. Again, the lilypad has to be set to passable in the database before this will work.
Title: Re: Jumping
Post by: magic2345 on February 18, 2007, 12:52:38 AM
YEAH! IT WORKS!
Thanks for taking the time to help me,