JUMP TO XY

Posts

Pages: 1
Rave
Even newspapers have those nowadays.
290
In normal move events commands we only have option to jump BY specific amount of tiles.

I'm looking for a script that would let you jump TO specific x,y (standard jump command should not be affected as I'm using it too).

What I'm working on is platforming stage in my RPG, kinda similar to those in Mario & Luigi series, where when you're on spikes or other bad terrain, you jump back either to start of level or last "safe" location.
Like, teleport back? Why not use Memorise Position? Just take two variables - X and Y - and then use memorise position when you get to a certain spot (checkpoint) or start a stage. Then when you hit the various deadly obstacles, fade out screen, teleport to X/Y, fade in. Easy~
Rave
Even newspapers have those nowadays.
290
No, I want actual jump.
Deltree
doesn't live here anymore
4556
I am using the jump command to mimic a thrown object to an arbritrary location, which sounds similar. I use this inline script:

$game_map.events[EVENTID].jump(x, y)

Where eventid is the number of the event (best stored as a global constant) and X and Y are tile coordinates which I calculate as the difference between the current position and the x and y distances to jump.

Hope this helps.

Edit: This is in Ace
Rave
Even newspapers have those nowadays.
290
And what if I want to jump player?
Deltree
doesn't live here anymore
4556
Good point! This works too:

$game_player.jump(x, y)


Rave
Even newspapers have those nowadays.
290
Pages: 1