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.

Stopping players from jumping over NPCs

I'd really love to know how I could do this, via script or eventing :)

I'm currently using this event system:
Code:
if Y is being pressed: 
> if player is facing left
>> jump 2 spaces left 
> if player is facing up
>> jump 2 spaces up
> if player is facing down
>> jump 2 spaces down
> if player is facing right
>> jump 2 spaces right

I have them ignoring if the move is impossible, waiting till the movement is over, and waiting 4 frames between each jump, but I thought I'd just give you the basic pseudocode.

Would there happen to be a script around for RMXP that can make more realistic jumps? If I recall correctly, there was one for VX.

Thanks for any help,
Megalomania
 
Bump, I'm still rather interested in this code.
What jbrist posted would also be cool, but I don't mind if it's not in there :)

I think you should also post this module in the Scripts forum, Sephi ^_^ I'm sure many people would love it :)
 

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