The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: Valcos on February 06, 2007, 04:31:49 AM

Title: Is there a script...
Post by: Valcos on February 06, 2007, 04:31:49 AM
I was wonder is there a script that lets you jump when you press a button? If there is can someone give me a link ;D Or can someone make one for me if possible Im still noob so i dont know how to script.
Title: Re: Is there a script...
Post by: Irock on February 06, 2007, 04:37:43 AM
You can use common events.
Title: Re: Is there a script...
Post by: modern algebra on February 06, 2007, 04:41:06 AM
You don't need a script, just a common event. Set it as a paralell process and call it with some switch at the beginning of the game. Then put in the common event something to this effect:


Conditional Branch: Button Y is being pressed [Comment: Y is S by default and can be set in F2 of Test Play]
  Conditional Branch: Player is facing down
     Set Move Route: Player (Ignore if can't move)
         Jump: +0, +1
  Else
       Conditional Branch: Player is facing up
          Set Move Route: Player (Ignore if can't move)
            Jump: +0, -1
       Else
          Conditional Branch: Player is facing left
             Set Move Route: Player (Ignore if can't move)
                Jump: -1, +0
          Else
             Set Move Route: Player (Ignore if can't move)
                Jump: +1, +0                

You can edit distance, just post if this doesn't work.
Title: Re: Is there a script...
Post by: Valcos on February 06, 2007, 04:42:38 AM
Oh ok im going to try it out right now. Thanks.
Title: Re: Is there a script...
Post by: Irock on February 06, 2007, 04:46:07 AM
But you don't jump over anything. You could if you used phasing but then you could get stuck on things.
Title: Re: Is there a script...
Post by: Valcos on February 06, 2007, 04:56:51 AM
Uhh im did all of those events in the common event thing and it didnt work  ??? ? Is there something else i should do?
Title: Re: Is there a script...
Post by: Irock on February 06, 2007, 05:04:40 AM
Set it to parralel process. Select a switch. Activate the switch in game. There ya' go.
Title: Re: Is there a script...
Post by: Valcos on February 06, 2007, 05:17:33 AM
Oh, ok thanks both of you it works now.
Title: Re: Is there a script...
Post by: modern algebra on February 06, 2007, 05:39:48 AM
No problem. You might want to add in a Wait command at the end of it so that your guy doesn't accidentally jump twice. If you want to be able to jump over things or jump in place you can edit the distances. If you do want to be able to jump over things, be sure to put in conditions so he can't jump through trees and other similar objects.