Help - Search - Members - Calendar
Full Version: push items on screen
RPG RPG Revolution Forums > Game Engines > RPG Maker XP Discussion
Bigace
I need an event where you can push bolders events around on the screen. I was trying to create a look safe and you need to push the boulders in the right spot for the next area to open up. Anyone know how to do this.
Scriptless
Make an event, choose how you want it to look like. (ex:rock) set the event to player touch. Then put in move route, and put in move away from player. and click on skip if cannot move, n' there ya go.
Bigace
QUOTE (Scriptless @ Dec 31 2009, 08:13 PM) *
Make an event, choose how you want it to look like. (ex:rock) set the event to player touch. Then put in move route, and put in move away from player. and click on skip if cannot move, n' there ya go.


Okay, cool it works. Okay now I need to figure out how to drag it away from the wall so the player doesn't get stuck. I probably should of added that to the OP.
Unka Josh
Of course, that won't tell you when the boulder is on the right spot.

For that, you have two choices:

1) Terrain Tags on the key square (Since this is RMXP), and a Parallel Process event checking the Terrain Tag, or

2) A Parallel Process event checking the X and Y of the Boulder, and comparing it to fixed coordinates.

QUOTE (Bigace @ Dec 31 2009, 06:07 PM) *
QUOTE (Scriptless @ Dec 31 2009, 08:13 PM) *
Make an event, choose how you want it to look like. (ex:rock) set the event to player touch. Then put in move route, and put in move away from player. and click on skip if cannot move, n' there ya go.


Okay, cool it works. Okay now I need to figure out how to drag it away from the wall so the player doesn't get stuck. I probably should of added that to the OP.


Do you want it to be pull-able by the player, or resetable? The latter is much, much easier to code... and leaving and re-entering the room will do it automatically, so you don't need to worry about that.
Redd
Just like in Pokemon, if you leave the room and go back it will all be perfectly good again smile.gif Just make an escape rope or a Panic! button to use if you get stuck somewhere that transfers you out of the room.
Bigace
QUOTE (Unka Josh @ Dec 31 2009, 09:16 PM) *
Of course, that won't tell you when the boulder is on the right spot.

For that, you have two choices:

1) Terrain Tags on the key square (Since this is RMXP), and a Parallel Process event checking the Terrain Tag, or

2) A Parallel Process event checking the X and Y of the Boulder, and comparing it to fixed coordinates.

QUOTE (Bigace @ Dec 31 2009, 06:07 PM) *
QUOTE (Scriptless @ Dec 31 2009, 08:13 PM) *
Make an event, choose how you want it to look like. (ex:rock) set the event to player touch. Then put in move route, and put in move away from player. and click on skip if cannot move, n' there ya go.


Okay, cool it works. Okay now I need to figure out how to drag it away from the wall so the player doesn't get stuck. I probably should of added that to the OP.


Do you want it to be pull-able by the player, or resetable? The latter is much, much easier to code... and leaving and re-entering the room will do it automatically, so you don't need to worry about that.


Sorry I didn't reply back earlier, I was playing assassin Creed 2, okay I try that in a couple of moments. And I guess we can go with the latter if that one is easier then sure.

Edit: Is there a way to make reset only the boulders location, instead of the whole map. Like click button 'B', and the screen flashes and all the boulders that you were pushing are reset.
QUOTE (Redd @ Dec 31 2009, 09:35 PM) *
Just like in Pokemon, if you leave the room and go back it will all be perfectly good again smile.gif Just make an escape rope or a Panic! button to use if you get stuck somewhere that transfers you out of the room.

Yep, pokemon like in the good ol'days.
Redd
Yeah I could do that probably. It would require a bit of scripting, so give me just a bit.

EDIT: If you reset the rocks, then it would just change the rocks, and the player could get into some pretty bad trouble, or if used usefully, you could get through the pushing a LOT easier since the rock that was just in front of you is now gone.

Here's what your PARALLEL PROCESS event should look like:
CODE
@>Conditional Branch: The A button is being pressed
  @>Transfer Player [your map and position]
  @>
  :   Else
  @>
:    Branch End
@>


There you go.
Unka Josh
It wouldn't require scripting. Just making note of the original locations of the boulders.

Then, if you go to your "Reset" switch/Common Event/Whatever, use Set Event Location to move all of the boulders back to the square that they were originally on. Not hard or complicated.
Redd
Oh lol I was thinking using something like $map.reset or something along those lines. I'm not saying that's a real thing, I just know there's something like that to reset everything on the map except the player.
Bigace
Thanks for the feedback guys, Iet me finish mapping the dungeon and I'll post back if any problems occure.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.