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 Posts

Latest Profile Posts

I officially declare today "test play day." I'm going to waste the whole day playing video games, which isn't a shock to anybody, but hopefully today I'll play my own and figure out what still needs fixin's.
Empty Bottles and Health Extenders are now a thing.
Also the Sling-Shot does damage to enemies now, but not a lot and you won't get gold from killing them that way.
ScreenShot_5_26_2022_11_36_32.png
added a Panic gauge to battle. it fills up according to your actions. each character has a different passive that activates once the gauge is full. also once full, a countdown starts and after each action taken, the gauges decreases. with each character, the decrease is different.
Genuinely considering making a thread informing people how to Google.

Forum statistics

Threads
122,164
Messages
1,146,962
Members
160,434
Latest member
SirBigSad
Top