Shooting game jump event and tracking it's x pos relative to target

Ok, I'm back and I am making a little shooting minigame. It's pretty simple, right now I just have an event of a cannon pointed up at an event of a monster that walks down toward the player. The player stands behind the cannon and the action button starts the shot. In front of the cannon is the cannonball Event activated by a switch (from the cannon event). I tried using the movement route command but it moves the cannonball too slow even when I set the speed to x4 fast. I found the Jump moves at the speed I wanted so I have the cannonball Jump: 0,-6 so it jumps up toward the monster.

In the monster event I have 4 variables tracked. The cannonballs screen x & screen y and the monsters events screen x & screen y. As well as the movement of the monster stepping slowly toward the player. When the x & y match, there's an animation and the cannonball switches off and returns to it's spot in front of the cannon, ready to fire again.

The problem is, as long as the monster stays at 6 tiles up from the cannon it works. As soon as he moves 1 tile closer the cannonball fires past it and messes the whole thing up. I think it has to do with the jump because when I just use the move up in the command it works fine. Just too slowly.

Is there a way to track the x & y of the Jumping event? Or is there a way to track the difference in distance from the cannonball and the monster and set the Jump command with that variable? So it always jumps just as far as it needs to.

Is there a better way to do this I'm not seeing?

I plan on having more monsters that walk randomly around or toward the player and the cannon can shoot at each one. But I need to get this to work right with just a basic setup first.
I'm not too sure about how you have evented movement of the monsters, and the cannonball event.

In regards to the cannonball event, perhaps you can try creating different conditional branches that track the monsters 'y' coordinates separately, and results in the cannonball firing towards the related 'y' coordinates.
That's what I need to know how to do I think. Is there a scriptcall for the jump command that can referance a variable(s)? The variable will be the monsters co-ords so the Jump will jump right to that (if its within proper firing range that is, but I have to script that after). I dunno what it is though.

newCommand.parameters = ["Jump, $game_map.events[id].x, $game_map.events[id].y"] or something?
Speed is not all you have to increase^^

Frequencie must also be increased.

Than your Cannon Ball should be realy fast.

(If that not enough than, there is RGSS3 command to increase speed/and maybe Frequencie of Event further more.
Speed is not all you have to increase^^

Frequencie must also be increased.

Than your Cannon Ball should be realy fast.

(If that not enough than, there is RGSS3 command to increase speed/and maybe Frequencie of Event further more.
Nope it's not fast enough. What's the RGSS3 script?
I'm not too sure if events' coordinates can be referenced directly in a 'Set Move Route' script call.

The script call for changing movement speed is:

@move_speed = n

where 'n' is the speed variable.

Omit the 'Jump' command and try setting 'n' to 7 and above.
Hmm. Ok thanks but once I set it higher than 9 it still goes slow and the event goes through its walking or stepping phase which looks weird. Even if I set the Direction fix on.  Seems setting it too high breaks it.

Looks like I will have to accept the slowness and set the movement to go up multiple times to the top of the screen instead of autorun with just 1 move up command. That's odd.
As I said before, I'm not sure as to how you're setting up your events.

Even setting the movement speed to 7 seem to provide a speed equivalent to the jump command.

As for the stepping/walking animation, it's easy to fix. Just make sure that the relevant part of your spritesheet consist of only that one sprite, instead of multiple variations of it.
Yes, you can script a jump to jump to an event's position. Okay, this sounded weird. 😀

Read this topic:

http://forums.rpgmakerweb.com/index.php?/topic/25759-script-call-collection-for-vxace/?p=247427

Scroll to the Set Move Route section and try to make a working move route with script calls.

You can reference and event's position with $game_map.events[id].x and $game_map.events[id].y, just like how you wrote above.

And while you are reading that topic, bookmark it, it is very useful. 🙂
# Single Action

newCommand.code = moveCode # See List in Game_Character Default Script

newCommand.parameters = [""] # This refers to Jump, Wait, Switch On, Switch Off, Change Speed,

# Change Frequency, Change Graphic, Change Opacity, Play SE and Script.

newRoute.list.insert(0,newCommand.clone)
Do I use newCommand.parameters = [""]? I have no idea what to put in the "" everything I try results in errors. Can someone provide an example please?
I just remembered Vlue's Evening: Fine Tuning script, which makes your issue look like it is not an issue at all. 😀


That script comes with a move route script call which looks like this:

jumpto(x,y)That will make the player/event jump to the specified co-ordinate on the map.
Add $game_map.events[id].x and $game_map.events[id].y for the X and Y position and you are good to go. 🙂
Thanks, I got the script I'll check it out. I guess the command is used in the script because it doesn't work (undefined method) with the default scripts. I wanted to avoid using scripts due to incompatabilities and stick with events but I dunno if its possible.

Original thread: https://forums.rpgmakerweb.com/threads/shooting-game-jump-event-and-tracking-its-x-pos-relative-to-target.36898/