The RPG Maker Resource Kit

RMRK RPG Maker Creation => XP => XP Event Systems => Topic started by: Halestorm5 on March 29, 2008, 10:57:03 PM

Title: [XP] Working Moving Platform Tutorial
Post by: Halestorm5 on March 29, 2008, 10:57:03 PM
Recently, I needed a Moving Platform for my game. Earlier, I got it working perfecto! Then I was suggested by Falcon to make a tutorial, and now I'm making it :lol:

Ingredients:
Four variables
Basic knowledge of RMXP

Stages:

1. First make four variables to be prepared.
         
Spoiler for:
(http://i4.photobucket.com/albums/y144/Army100/Tutorial%20Images/Tutorial1.png)
Without these, this entire tutorial will be for nothin...

2. To start, make a brand new Event. Then make another page by pressing the 'New Event Page' at the top of the event thing. Also, make them both parallel process. Before you finish, make the second page have a condition of Self Switch A or somethin like that.

3. These next few instructions will be for the first page.
   A. Put into the event something like...
Quote
@> Control Variables: [XXX: Player X] = Player's Map X
@> Control Variables: [YYY: Player Y] = Player's Map Y
@> Control Variables: [XYZ: Platform X] = this Event's Map X
@> Control Variables: [ZZZ: Platform Y] = this Event's Map Y
4. Make a conditional branch about whether the 'Players X' variable is equal to that of 'Platform X'. There should be no 'else' in this branch. Then into it make another conditional branch inside the first one, but this one should have a 'else'.
   B. Into the first part of the conditional branch add somethin like (First bit is rather pointless) ---
Spoiler for:
Quote
@>Wait for moves completion
@>Set move route: Player
                                  Through on
                                   Through off
@>Wait for moves completion
@>Set move route: This event
                                  Through on
                                  Move down
                                  Move down
                                  Move down
                                  Move down
                                  Through off
@>Set move route: Player
                                     Move animation off
                                      Change speed 3
                                      Through on
                                     Move down x4
                                     Change speed 4
                                      Move animation on
                                      Through off
@>Wait for moves completion
@>Wait 20frames
@>Control self-switch A on
5. In the 'else' on the conditional branch add ---
Spoiler for:
Quote
@> Set move route: This event
                                                Through on
                                                 Move down x4
                                                 Through off
@>Wait for moves completion
@>Wait: 20 frames
@>Control self switch A on

Your result should be somethin like -
Spoiler for:
(http://i4.photobucket.com/albums/y144/Army100/Examples/Page1Working.png)

With these added you should be able to get the moving platform to move downwards four times, with or without the player on it. In order to get it to go backwards, just re-add everything again but change everything with says 'Move down' into 'Move up'... Oh and put it on the next page, so that something doesnt happen and screw it up. This is somethin like makin it look like -
Spoiler for:
(http://i4.photobucket.com/albums/y144/Army100/Examples/Page2Working.png)

Credits -
Me
Aliensoldier
Modern Algebra
If weren't for these people this wouldnt be here.

Found bugs -  
Non moving. Read the third post in order to see this bug and fix it.
Title: Re: [XP] Working Moving Platform Tutorial
Post by: modern algebra on March 30, 2008, 02:37:49 AM
Looks good. +rep
Title: Re: [XP] Working Moving Platform Tutorial
Post by: Halestorm5 on March 30, 2008, 05:42:40 PM
While toying around with my own platform, I found a really annoying bug :police:
When you arent on the platforms X or Y lines, then it work move. So you have to make the first conditional branch have an else, then you into that, you add the part which allows it to move around without the player on it by c & p. :bean:
Title: Re: [XP] Working Moving Platform Tutorial
Post by: memyselforwho on April 25, 2008, 03:04:04 PM
While toying around with my own platform, I found a really annoying bug :police:
When you arent on the platforms X or Y lines, then it work move. So you have to make the first conditional branch have an else, then you into that, you add the part which allows it to move around without the player on it by c & p. :bean:

So what exactly do I add in the first else?
Title: Re: [XP] Working Moving Platform Tutorial
Post by: Halestorm5 on April 25, 2008, 04:47:51 PM
Quote
@> Set move route: This event
                                                Through on
                                                 Move down x4
                                                 Through off
@>Wait for moves completion
@>Wait: 20 frames
@>Control self switch A on/off

Thats what u put into the first else ;D
Title: Re: [XP] Working Moving Platform Tutorial
Post by: memyselforwho on April 25, 2008, 04:52:14 PM
Thanks ^^
Title: Re: [XP] Working Moving Platform Tutorial
Post by: Demonic Blade on May 04, 2008, 08:14:36 AM
While it seems pretty good, the size seems bad. I doubt you'd actually need 4 switches, to say the truth, but I haven't excactly looked too much into detail on this one. It's a great tutorial. How about when using large platforms using more than one square?