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
81
Reaction score
167
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
81
Reaction score
167
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,437
Reaction score
6,248
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
81
Reaction score
167
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
6,990
Reaction score
4,739
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 Profile Posts

Small rant: While using SRD Hud maker for a battle hud, I typed in the wrong script call and got an error, but then forgot to delete the piece that caused the error before closed the Hud maker and hit F5 to restart the game. Now everytime I engage in a battle my game crashes...
:kaolivid:
Would Jump into Javascript be best off continuing to break down the MV core files, or would people prefer a quick detour to cover everything that's changed in the core from MV to MZ?
Not going to lie... PIXI Particles make fantastic graphics... But predicting the hitbox of something with a "fixed size" but whose graphics can stick out past that, is quite challenging. :kaoswt:
Would you like a glass of spiders?

Forum statistics

Threads
100,530
Messages
976,896
Members
132,081
Latest member
Kaezyelnatz
Top