Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Jumping Towards Question

Boy I feel like an idiot prematurely requesting that a thread be closed T-T
Anyway, regarding the closed thread "Jumping Towards?," how would I utilize the jump towards/away commands in a move route? It works 100% completely without error via call script, but when it comes to move routes, I'm utterly clueless as to how that's supposed to go down :-/
 
There is a script call in Move Route. In the move route, you don't need to do:

e1.jump_toward_character(e2)

But, you can't have more then one line either. So do this:

jump_toward_character(e2)

Replace e2 with the event or the player. Which is:

player : $game_player
event : $game_map.events[event_id]
 
Thanks, it worked. I actually tried that earlier, but instead of inputting the event ID, I put in @event_id, which I thought would work, but it didn't. Before this is closed, can someone explain this to me? This is exactly what I wrote:

$game_map.events[@event_id].jump_away_from_character($game_player)

at the script call of the move route.

The error I am getting is this:

NoMethodError occured while running script.
undefined method 'jump_away_from_character' for nil:NilClass

Thanks for the help, Mr. Mo ^-^ (and anyone else who helps)
 
$game_map.events[@event_id] returns the object nil, because @event_id isn't defined. Thus, no method 'jump_away_from_character' for nil happens because the method 'jump_away_from_character' isn't defined for the nil object class.
 
Replace event_id or @event_id with the event's ID Number.
Don't include the beginning zero's. For example, use

$game_map.events[1].jump_away_from_character($game_player)

rather than

$game_map.events[001].jump_away_from_character($game_player)

If you are making event001 jump away from the player.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top