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
170
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,402
Reaction score
499
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
170
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,457
Reaction score
6,282
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
170
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
7,014
Reaction score
4,754
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.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

So I have a lighter work schedule next week. Is that a sign to move on to MZ?
I got a new rpg idea yesterday, titled "The Hero We Summoned to Save Us is a War Criminal from our Past?!"
Work on Yanfly's MZ plug-ins is coming along nicely. Looking forward to getting them: http://www.yanfly.moe/wiki/Core_Engine_VisuStella_MZ
so uh variables can only be used for num lol? I guess I gotta fix that once MZ come out lol

Forum statistics

Threads
100,726
Messages
978,837
Members
132,353
Latest member
BM_ANDERSON
Top