YEP Smart Jump questions

Hello, thanks for stopping by!

I am using Yanfly's "Smart Jump" together with Yanfly's "Button Common Events" plugin to make the character jump when "shift" is being pressed.
Really simple stuff and there is no problems with that. However I'd like to improve on this basic mechanic by making the character able to jump down
from cliffs, but not back up!

I have thought about it for quite some time and I fear that it might not be possible without re-writing yanfly's smart jump plugin (which I can't do anyway).
But before giving up it is always worth a shot to ask the community, because you never know, someone might know something.

So is this possible to do somehow? 🙂
That?










Or else you design the cliff edges to be illegal so the player can't jump over them from the bottom (but still passable so you can get on the edge before jumping). Wonder if that would work.
@ByBilbo

Yes, that! I want it like it's done in Pokemon, Zelda and many other famous RPG's.
The only difference is that I want the player to be able to jump whenever they want unless they do an illegal jump (you can't do that in pokemon or zelda).
Yanfly's plugin makes the jump whenever you want part possible but the cliff edges are still a problem.

Thank you for the video. The only problems with the method shown there is that, depending on your map design and size, it can require a lot of events. Also I don't think I can map those event jumps to the same jump key as the "smart jump" (it would be confusing for the player if I couldn't).


I am not quite sure what you meant here though?  🤔

Or else you design the cliff edges to be illegal so the player can't jump over them from the bottom (but still passable so you can get on the edge before jumping). Wonder if that would work.
Because it's easier to understand with pictures:












Hope it helps 🙂


(but remember they won't be able to jump if they are 1 step from the edge, or if the cliff is 2+ high unless you set your smart jump to be bigger)


(also sorry for video quality don't have a good screen recorder :/)
@ByBilbo

Thanks, and don't worry about the recording I appreciate it and I understood what you meant. 🙂
I didn't think of that, but it creates a new problem where you can't jump to the edge even if you are not trying to jump upwards.
Also a bigger problem is that you can't jump down onto a leadge if it is only one tile (because then it will be a region 6 tile).

I have an idea myself (but I don't quite know how to to do it, maybe you can help?). 

What if I would add 4 conditional branches to the smart jump common event that checks if the player is:
a ) standing on region X
b ) facing direction Y
...and if true then smart jump does not activate, if false smart jump works.

Since you can jump down from cliffs in 4 different directions there would have to be 4 different checks bound to 4 different regions and facing directions.

I don't know if it's a good solution to the problem and I can't test if it works or not because I don't know how to check if the player is standing on a specific region. 🤣
Is it just me or did this event command change from how it was in Ace? 🤔
Not sure that it might work, because you're saying that for example the player can jump if facing down while on X region. But if he is on a leadge, then it won't work properly, while he might be able to jump over a cliff facing north. But it is worth the exploration ^^


The problem is, the tile HAS to be illegal or else the player always can jump on it, because of the plug-in :/ It would be very hard to block the path one way but not the other way...
@byBibo

Yes, that would be true when the plugin command have been activated.
However, my idea is to make the check first and if it's not illegal, THEN the event runs the plugin command "SmartJump 2". If not it does nothing. 
I think it could work, but I still can't find how to check if the player is on a certain region. Maybe you can't check it? I was so sure that you could...
@Parallax Panda


Make an conditional branch, go to tab 4, check script and paste this:


var x = $gamePlayer.x; var y = $gamePlayer.y; $gameMap.regionId(x,y) == 7


Change the 7 for region Id you will be using. The condition will only work when the player is on the region specified. Hope it helps 😀
@killerfer

Thank you, it really helps! is that javascript? 🙂  It's a really neat way to check the region the player is standing on.

Anyway, I used it but I'm still not satisfied (with my old idea). The RPG maker perspective makes it really difficult to make it work well because north, west and east does not have depth and thus you should only need to jump to the next tile. While if you jump south you may need to jump 2 or more tiles. Anything I tried leaves undesired quirkes such as not being able to jump around near cliffs, and such things makes the game seem worse than if it hadn't had a jumping system at all.

I have temporarily given up on giving the player the freedom to jump around as they want since that seems almost impossible to to well without using a lot of regions and restricting the way you can build your maps, at lest for me. So instead I want to try to make it just like it is in the Pokemon/Zelda games. Which is, if you walk up to a cliff and keep walking in that direction you will jump of the cliff (after a small timed delay). But even that was not so simple as I thought it would be. ;_;

Now, I'm not even sure if I should be using yanfly's smart jump for this since I don't think it adds much and I don't think you can set the y coordinate for you landing position (if you jump from a 1 tile high cliff to the right you should logically land on the tile underneeth the tile in front of you). But I still use it out of convinience and because I mighty try to implement an "jump-as-you-want" mechanic later on. To make this work, I'm also using another Yanfly plugin, the "RegionEvents" plugin that is.

And sure, it works if you walk straight up to the cliff and jump off it. But if you walk along side the cliff and then turn and try to jump off, you can't.
I think I know why this is (the event has already run past the necessary checks?), but how to fix it? And is there any reason for me to still use SmartJump?

Here is a picture that illustrates what's written above:




And here is a picture of my common event:



I aplogize for getting further and further from my original post (which was only focused on using SmartJump) but I really need som help with the eventing, too.  :headshake:
 

Original thread: https://forums.rpgmakerweb.com/threads/yep-smart-jump-questions.56991/