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

Status
Not open for further replies.

Devildimos

Villager
Member
Joined
Jul 11, 2014
Messages
28
Reaction score
29
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,332
Reaction score
482
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

Villager
Member
Joined
Jul 11, 2014
Messages
28
Reaction score
29
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,268
Reaction score
6,012
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

Villager
Member
Joined
Jul 11, 2014
Messages
28
Reaction score
29
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,752
Reaction score
4,602
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

Rpg MZ looking good! Not much of a fan of the graphics for world tiles, but love the changes for sprites and movement preview!
Before I am done with even one game, I am going to need Psychiatric assistance after doing all these sprites!
Still I am improving, Spriting not mental fortitude.
It's still early days, and I was going to keep this under wraps until development is a bit further along, but I'm just so damn proud of how robust the integrity-checking in this plugin is that I have to share it.
Do you think the new RPG Maker MZ has support for Android devices ?
JDgoldvox wrote on Mr. Detective's profile.
hey, could u help me with a problem? basically, How do I delete a character from a map after a cut scene is over? I am really new with RPG maker MV. Please help!

Forum statistics

Threads
99,265
Messages
963,659
Members
130,863
Latest member
AdamEternal
Top