ATTEMPTING TO MAKE A TELEPORT MECHANIC (RMXP)

Posts

Pages: 1
I want to add a typical "jump" mechanic to my game. Press button, move two squares forward (if that's an acceptable move).

I don't know how to make scripts, so I've been trying this as a common event (similar to a "running" common event I've seen: press button, increase player's move speed; else regular move speed).

I initially tried to make it "can teleport over terrain tag 1 or 2 tiles, and can land on terrain tag 0 or 2 tiles" : making it so that 1 was the "gap" that's okay to cross over, 2 are special tiles that can be landed on, and 0 are general tiles that the player can walk on.

This didn't work, as the player would often land on a non-walkable tile. I eventually decided to scrap this in favor of two separate mechanics: a common event to teleport on regular, walkable land, and specific events placed next to gaps to teleport the player across those.

I don't know how to take post images, so I'll post this as psuedo-code to make it easier to follow. For the common event (teleport up):

If Z is pressed
... and if the player is facing up
... and if the terrain is type 0 (can be walked on)
...... wait 10, move player (through, up)
...... if terrain is type 0
......... wait 10, move player (through, up)
......... if terrain is type 0
............ teleport succeeds
......... else move (down, down)
...... else move (down)


And for the events that are placed, rather than run parallel to the game:

If Z is pressed
... and if player is facing up
... and if player is standing on this event tile
...... move (up, up)

I've tried several variations on these, adding both "wait 10" and "move: player: wait 10" to various points during the events, in hopes of not having the game break due to button mashing. What is currently happening seems to be that the game doesn't wait for the event to run completely before allowing another button input. So if the player mashes Z, the game reads "move (up, up)" "move (up, up)" "move (up, up), check terrain, not good terrain, move (down, down)." Which leads to the problem of potentially being four tiles beyond where the player should be allowed (standing over an abyss, inside a wall, etc).

What I need is some way to say "while this event is going on, ignore all commands given by the player". Or some other way of setting up the teleport system that will result in this outcome. Craze told me that Great Red Spirit might be able to help, but if anyone else knows how to fix this, feel free to give some input. If there's anything I need to go into more detail on, please let me know. Thanks!
I did something like this in 2k3, but you're working with XP, so bleh.
I don't know anything about VX or 2k3, but I would imagine there might be comparable commands. Would you mind telling me what you did, and I'll look around and see if I can convert it into something that works for XP?
http://rpgmaker.net/games/935/

The lunge attack system here could be modified into jumping, it would merely be a graphic of jumping rather than dashing forward. I don't know how this can be transposed into XP, and you'd have to have 2k3 installed, as well possibly a slight working knowledge of 2k3 to figure out how it works.
Bah, still can't get it to work. I think I'll just go with the band-aid solution and put a big warning: "DO NOT BUTTON MASH OR YOU WILL FALL OFF A CLIFF AND DIE" That's /almost/ as good as fixing the problem, right?
I actually remember that I did make a jumping system for my game Mindflare, but I don't know if that was part was in the demo I released or not. However, it can be done in 2k3 using Terrain numbers.
post=96957
Bah, still can't get it to work. I think I'll just go with the band-aid solution and put a big warning: "DO NOT BUTTON MASH OR YOU WILL FALL OFF A CLIFF AND DIE" That's /almost/ as good as fixing the problem, right?

Blarg, that's a terrible idea. I'd rather you go without the jump mechanic than leave it in completely buggy.
Yeah, I know... unfortunately, there doesn't seem to be any command in RMXP that will stop it from being buggy... =\
Pages: 1