Alarkus

Veteran
Veteran
Joined
Oct 15, 2016
Messages
95
Reaction score
42
First Language
English
Primarily Uses
RMVXA
Hi. I'm trying to make it so an event can jump to a player via a script call to achieve a "projectile" effect and I'm having some issues.
I managed to make it so the event jumps to variables containing the players X and Y, but the event jumps way off screen for some reason. Not sure what I'm doing wrong.
Here's what I attempted to use.
jump($game_variables[12],$game_variables[13])
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,626
Reaction score
505
First Language
German
Primarily Uses
RMMV
When and were do you assign values to that Variables 12 and 13?

If this is for a Projectile, why not using the Eventcommand "Set Event Location"?
It would Teleport that Event directly to that position without jumping over the Map.

This Thread could be very Helpful:

In your case this should Teleport EventID1 to the Position of the Player.

$game_map.events[1].moveto($game_player.x, $game_player.y)

for the Jump with Eventid1 jump to Player it would be:

jump($game_player.x - $game_map.events[1].x, $game_player.y - $game_map.events[1].y)

and here Edited so it uses the target chosen in the Moveroute Command:

jump($game_player.x - $game_map.events[self.id].x, $game_player.y - $game_map.events[self.id].y)
 
Last edited:

Alarkus

Veteran
Veteran
Joined
Oct 15, 2016
Messages
95
Reaction score
42
First Language
English
Primarily Uses
RMVXA
When and were do you assign values to that Variables 12 and 13?

If this is for a Projectile, why not using the Eventcommand "Set Event Location"?
It would Teleport that Event directly to that position without jumping over the Map.

This Thread could be very Helpful:

In your case this should Teleport EventID1 to the Position of the Player.

$game_map.events[1].moveto($game_player.x, $game_player.y)

for the Jump with Eventid1 jump to Player it would be:

jump($game_player.x - $game_map.events[1].x, $game_player.y - $game_map.events[1].y)

and here Edited so it uses the target chosen in the Moveroute Command:

jump($game_player.x - $game_map.events[self.id].x, $game_player.y - $game_map.events[self.id].y)
Well, the reason I wanted to use the jump feature is because a transfer would be instantaneous, without any time for the player to move out of the way. With the jump there's a few frames before it gets to the player, so it better gives the illusion of say, a grenade or energy ball coming at the player without the awkwardness of 4 direction movement.
What you wrote seems to be working though, so thanks!
 
  • Like
Reactions: Bex

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,626
Reaction score
505
First Language
German
Primarily Uses
RMMV
I was just curious. Thanks for explaining, and good to hear that it works.
 

Latest Threads

Latest Profile Posts

What happens with this list, is it currently possible to buy any of these RPGMAKER at least those that are for PC?

Combat skill combination demostration
grief... finding a font that works with the engine has been a bigger process than I thought it'd be. doesn't help MV loves to scrunch letters next to each other like a football huddle.
The new Phoenix plugin. I drew icons and an interface into it

Forum statistics

Threads
122,182
Messages
1,147,088
Members
160,455
Latest member
fajar82
Top