Site Announcements

  • Account registration restricted. Email lord.ixzion AT gmail.com and I will get you set up. Thanks.
  • RPGMM Discord Channel - https://discord.gg/YJnAfVr

  • New to the site? Let us know!! - Check here.
  • RPGM Magazine Mission Statement. - Check here.
  • We now have a forum up specifically for the races, check it out. - Check here.


[Continue]

It is currently November 14th, 2024, 2:08 pm
View unanswered posts | View active topics


All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: January 12th, 2014, 12:24 pm 
Rank 2: Eager White Mage Rank 2: Eager White Mage
Offline
User avatar

  Level 10
 

Joined: March 15th, 2006, 6:22 am

Posts: 308

Location: Florida
This system has such potential, you can literally make gravity in RPGM2 with this system. Please note that all credit to this find belongs to Draygone, if you use it in your game it wouldn't be a bad idea to mention it. Anyway let's begin.

Create the following variables:
Height
Fall Z

Flags:
Falling
Still

We need also to make two objects:
InvisRug
InvisJump

You HAVE to make the InvisRug model the blue rug object (this is how the magic works)

Create the following events:

JumpRug
JumpEvent

Now the scripts:
[RugDupe]
Repeat flag=off
Data: Game Info Load
Height=Party Z-1 (This will make the event duplicate underneath the player's feet) X,Y,Z
If Event X < Party X
Event: Duplicate: JumpRug: 1,0,0
Temp Remove
End
If Event X > Party X
Event: Duplicate: JumpRug: -1,0,0
Temp Remove
End
If Event Y < Party Y
Event: Duplicate: JumpRug: 0,1,0
Temp Remove
End
If Event Y > Party Y
Event: Duplicate: JumpRug: 0,-1,0
Temp Remove
End
If Event Z < Height
Event: Duplicate: JumpRug: 0,0,1
Temp Remove
End
If Event Z > Height
Event: Duplicate: JumpRug: 0,0,-1
Temp Remove
End
Wait: 1f
Script Branch End

This script will go into the action slot of the "JumpRug" event place it on a map and test it out it should follow you around under your feet.

Now we need an event to constantly be on the ground for us to check when/when not to be "falling".

New action script:
[JumpEvent]
Repeat:Flag=off
Event: Bypass Objects: On
Event: Bypass Members: On
Data: Game Info Load
Event: Info Load
Fall Z=Event Z+0
If Event X < Party X
Event: Move E 0f
End
If Event X > Party X
EVent: Move W 0f
End
If Event Y < Party Y
Event Move: S 0f
End
If Event Y > Party Y
Event Move: N 0f
End
If Party Z < Fall Z
Falling=on
End
IF Party Z >= Fall Z
Falling=off
No Movement=off
End
Script Branch End
This is pretty much saying if the player is higher than the even to trip the flag "Falling". Which the falling script looks like so:

[Falling]
Repeat:Flag=off
If Falling=on
Repeat: Falling=On
Party:Vertical Move: -3 1f (anything lower and it's almost TOO fast)
End
Script Branch End
Script Branch End

Place the JumpEvent on your map and insert the JumpEvent action script to the action slot of the event. Test it walk to a ledge and you SHOULD fall over the edge.

To make a jump all you need to do is a make a Button Mapping script.

Repeat
Input Buttons Constant Wait
If User Button=6 [ ] for now
Party Vertical Move: 50/16 Add to current height 5f
End

Now if we test it and press [ ] we should go up and then come back down, but you'll notice that your feet will be somewhat in the ground, no worries there is a simple fix to it. Name it "Z Checker"

[Z Checker]
Repeat
Repeat: Party Z <= Fall Z
Vertical Move: 1 1F add to current
End
End

In your Enter Map script make sure you call the following:

Apply Together
[Inf.Vehicle]
[User Button]
[Z Checker]
[Fall Check]
In Order

There is one final problem that needs to be addressed this system doesn't work too well if you try to move and jump things can get wonky....but yet again there is a simple step check that can be done to fix this problem like so:

[StandStillChk]
Repeat
Data:Game Info Load
TempVar0=Player X
TempVar1=Player Y
Wait 8F
Data: Game Info Load
If TempVar0=Player X
If TempVar1=Player Y
If Still=Off
Still=On
End
End
End
If TempVar0=/=Player X
If Still=On
Still=Off
End
End
If TempVar1=/=Player Y
If Still=On
Still=Off
End
End
Script Branch End

Now on the conditions right before "Jumping" we need to add
If Still=On
Vertical Move: 50/16 5f add to current
End


Test it and you should only be able to jump up and move when you're standing still for at least 1 step.

I almost forgot you'll want to make a indirect step check to stop the player from moving in the air indefinitely the best way to make the player "drop" when you want is to just turn the system "No Movement" flag to on it will drop you dead in your tracks and fall straight down. Anyway enjoy! If you have any questions feel free to ask!

Video to go along with it, as well as a save file:




Save File Here (Slot 2)


Top
Profile  
 
PostPosted: January 13th, 2014, 12:02 pm 
Site Admin Site Admin
"The worst pokemon."
Offline
User avatar

  Level 97
 

Joined: January 16th, 2006, 1:09 pm

Posts: 15377

Location: 33.2076° N, 92.6663° W
There's truly nothing that RPG Maker 2 can't seem to do. I really like how you can combo jump on rows of enemies.

_________________
Image
"Belief extremely stately towards great accomplishment."
-eruperade


Top
Profile  
 
PostPosted: January 13th, 2014, 12:32 pm 
Rank 7: Learned Black Mage Rank 7: Learned Black Mage
Mongolian Chop Squad
Offline
User avatar

  Level 63
 

Joined: February 27th, 2007, 8:54 pm

Posts: 3449

Location: EXPEL
I can see this becoming a very cool puzzle/platformer.

Way to innovate!

_________________
ImageImageImageImageImageImageImage


Top
Profile  
 
PostPosted: January 13th, 2014, 12:34 pm 
Rank 2: Eager White Mage Rank 2: Eager White Mage
Offline
User avatar

  Level 10
 

Joined: March 15th, 2006, 6:22 am

Posts: 308

Location: Florida
insultobot wrote:
I can see this becoming a very cool puzzle/platformer.

Way to innovate!



Thanks guys! I'm actually reworking Epic Adventure to be a puzzle/platformer using this system. I'll hopefully have at least the first world done come
MagCon '14.


Top
Profile  
 
PostPosted: January 15th, 2014, 7:10 pm 
Rank 6: Potent White Mage Rank 6: Potent White Mage
Offline
User avatar

  Level 0
 

Joined: February 12th, 2007, 6:10 pm

Posts: 2648

Location: near Washington D.C.
Awesome.

_________________
Modal Realms
"a proper designation of universal existence"


Top
Profile  
 
PostPosted: April 16th, 2014, 5:07 am 
Rank 0: Magonian Apprentice
Offline

  Level 1
 

Joined: July 18th, 2013, 8:16 pm

Posts: 17
I know I'm a bit late to this party, but just wanted to say this is incredibly cool! Never thought the "goomba stomp" could be pulled off so smoothly in RM2!

How scalable is this trick? Can it be easily applied to an entire game, or does it need to be individually scripted for each event or area?


Top
Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 27 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group