Player Jump to pos variables [VX ACE] (Solved)

Status
Not open for further replies.

Devildimos

I ruin memes for a living
Veteran
Joined
Jul 11, 2014
Messages
82
Reaction score
174
First Language
Eglish
Primarily Uses
RMVXA
Hello.
Not sure if this is the correct board. I am a noob in this.
I am trying to make a player jump to a stored variables [X,Y] without using transfer_player.
What I am trying to create is a Warp skill that stores the player's X and Y and when using the skill again the player will jump to that position. However, If I use transfer my random dungeon script would reset the dungeon. but jumping works.
I got this scrip call but it gives me the eval(script) of doom error.

$game_player.jump_pos(
$game_variables[641],$game_variables[642])
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,822
Reaction score
623
First Language
English
Primarily Uses
RMVXA
I can't find a jump_pos method
You probably meant to use jump
$game_player.jump($game_variables[641],$game_variables[642])
 

Devildimos

I ruin memes for a living
Veteran
Joined
Jul 11, 2014
Messages
82
Reaction score
174
First Language
Eglish
Primarily Uses
RMVXA
Thank you for your reply, Roninator2.
But that is not what I meant. This will use the method "jump" from the move route.
I am looking for a jump that does the same as transfer player. But jump instead of transferring the player.
For example: My skill Warp will store the X and Y of the player's map position. and remembers it until the player presses the skill Warp again. Which will transparent the player, Jump to the X and Y that was stored and turn off the transparent.

I guess this require a script instead?
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,839
Reaction score
6,819
First Language
Indonesian
Primarily Uses
RMVXA
I made my own snippet
Code:
class Game_Character
  # --------------------------------------------------------------------------
  # Jump to point/coordinate. Coz, I hate to calculate
  # --------------------------------------------------------------------------
  def jump_to(xpos, ypos)
    x_dist = xpos - x
    y_dist = ypos - y
    jump(x_dist, y_dist)
  end
end
It uses .jump_to instead of .jump_pos
 

Devildimos

I ruin memes for a living
Veteran
Joined
Jul 11, 2014
Messages
82
Reaction score
174
First Language
Eglish
Primarily Uses
RMVXA
Your name is in the credits TheoAllen And your own snippet works like a charm.
Thank you very much for your supports and replies!
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
8,033
Reaction score
5,334
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

I'm moving on from RMXP finally. I've been stuck in a difficult decision between XP and MZ, and I've given up and moved on to MZ. Overall I'm really liking it, I wish tilesets were easier to setup like XP, but it's actually not that bad!
Have you ever gone full 'Ship of Theseus' while frankenspriting? Because I just did.
I saw my new eye doctor today, he reminds me of Satoru Iwata for some reason
I've been using a modified version of a script called Multiple Messages. It makes my text boxes look like a Mario & Luigi game! There is something about it that bothers me a little bit, but I shouldn't worry about that now.

Side note, Mist's walking animation is almost perfectly in sync with Loose Yourself by Eminem.
Starting work on some stuff for the community. Hopefully it will be fun, and useful to somebody.

Forum statistics

Threads
107,773
Messages
1,032,040
Members
139,915
Latest member
nick7626
Top