Main Menu
  • Welcome to The RPG Maker Resource Kit.

[XP] Working Moving Platform Tutorial

Started by Halestorm5, March 29, 2008, 10:57:03 PM

0 Members and 1 Guest are viewing this topic.

Halestorm5

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][/spoiler]
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]
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
[/spoiler]
5. In the 'else' on the conditional branch add ---
[spoiler]
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
[/spoiler]

Your result should be somethin like -
[spoiler][/spoiler]

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][/spoiler]

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.

modern algebra


Halestorm5

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:

memyselforwho

Quote from: 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:

So what exactly do I add in the first else?

Halestorm5

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


Demonic Blade

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?
I wonder how many of my-reps are there for a reason, and not just because some jackass wanted to show off in front of some other jackasses...?
Probably a lot of them - and those people sure as hell don't deserve my pity, let alone my disgust.
That's right, let's see some more -Rep'ing! BOOYEAH!!