[RM2K3] [RM2K] PLAYER SIT DOWN FUNCTION

Posts

Pages: 1
Hi I'm a noobie trying to use RM2K to make a sitting function, but I'm not sure how to do this.I have made a sitting graphic of the player already.

I wanted to create an event where pressing the Up Arrow will allow the character to sit onto the chair/bench. When they are sitting down they are unable to move, except by pressing the Down Arrow to get off the chair.

Could someone explain the simplest way to achieve this? Thank you!
Marrend
Guardian of the Description Thread
21781
So, here's what I'm thinking. Make the "sitting down" event triggered by "On Hero Touch", probably "Same Level as Hero".

If "sitting" can only be triggered when the player presses the Up button, that would be a Conditional Branch, checking to see if the "Up" button is being pressed. If it is, you'll need to do a Move Route, first enabling "through", then moving a tile up, then Changing Player Graphic. There might be a separate command for changing graphic, but, I'm pretty sure it's also in Move Route. Once that is done, activate a switch.

The idea here is that the switch activates an Auto Run event (probably a Common Event), as that will lock down player movement. What the Auto Run does is check to see if the player is pressing the "Down" button, and if they do, Move Route to restore the original graphic, move the player a tile down, disable "through", and disable the switch.
Well, I'm not sure if this is the easiest way to do it, but I took a stab at eventing it, and this is what I came up with:



Make sure the Trigger is set to Event Touch, and the Priority is set to Same as Characters.

Sorry if it's a little hard to follow. Basically, the key input command will check to see if the player is pressing a button, then if they are, set a variable accordingly.



So, if the player is pressing Down Key, the variable I called KeyInput will equal 1, if they're pressing the left key, it'll equal 2, and so on and so forth.

The labels just make a loop that prevents the player from moving until the down key is pressed.
author=Marrend
So, here's what I'm thinking. Make the "sitting down" event triggered by "On Hero Touch", probably "Same Level as Hero".

If "sitting" can only be triggered when the player presses the Up button, that would be a Conditional Branch, checking to see if the "Up" button is being pressed. If it is, you'll need to do a Move Route, first enabling "through", then moving a tile up, then Changing Player Graphic. There might be a separate command for changing graphic, but, I'm pretty sure it's also in Move Route. Once that is done, activate a switch.

The idea here is that the switch activates an Auto Run event (probably a Common Event), as that will lock down player movement. What the Auto Run does is check to see if the player is pressing the "Down" button, and if they do, Move Route to restore the original graphic, move the player a tile down, disable "through", and disable the switch.


Thanks!! I'll give it a try!

author=Sidewinder
Well, I'm not sure if this is the easiest way to do it, but I took a stab at eventing it, and this is what I came up with:



Make sure the Trigger is set to Event Touch, and the Priority is set to Same as Characters.

Sorry if it's a little hard to follow. Basically, the key input command will check to see if the player is pressing a button, then if they are, set a variable accordingly.



So, if the player is pressing Down Key, the variable I called KeyInput will equal 1, if they're pressing the left key, it'll equal 2, and so on and so forth.

The labels just make a loop that prevents the player from moving until the down key is pressed.

Thanks for the image explanation! I'll try this function as well :)!
Pages: 1