RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
[XP] Working Moving Platform Tutorial

0 Members and 1 Guest are viewing this topic.

****
Rep:
Level 88
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:
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:

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:

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.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Looks good. +rep

****
Rep:
Level 88
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:

***
Rep:
Level 85
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?

****
Rep:
Level 88
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

***
Rep:
Level 85

***
Rep:
Level 86
I hate everyone except the ones I don't hate...
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!!