I have an event that is "Below characters" and the trigger is "Player Touch", and I want to trigger it when jumping onto it. I can't have these events be parallel because there are a lot of them. Is there some way to "activate" an event after jumping onto them, the same way it would if you had simply moved onto them?
I feel like I came across a simple script call solution to this a long time ago when it was somebody else's problem, but I can't find it now.
Thanks!
MV - When jumping onto an event, event is not triggered.
● ARCHIVED · READ-ONLY
-
-
Hi there!
Not by default.
You will need a workaround for that with that involves checking if the player collides with event.
Or you can use a plugin if that is an option:
Hakuen Studio Jump System for RPG Maker MZ by Hakuen Studio
You will need my core plugin:
Hakuen Studio Eli Book RPG Maker MZ by Hakuen Studio -
No, I know that it is the intended behaviour (although I'm not sure why, seems like landing on a tile should have the same behaviour whether you jump there or move there).Not by default.
But I'm really looking for a non-plugin way to do this (I've already figured out a couple of ways to do it with existing plugins), and as I mentioned before, I could've sworn there was some simple script call that would solve this problem, I just can't seem to find it now. I'm still looking, if I find it I'll post it. -
I think you could use a script that calculates the distance betwen events (or events&gameplayer).. and use a "if condition" that triggers with distance 0..
- for example a common event (or parrallel event on the map) could trigger different switches depending on which event has a distance of 0(to the gameplayer). And the event could have the event trigger with that switch.
- this should work without any plugin , only by using a bit of script and some switches.
i am not giving a step by step advice here, i am just pointing in a direction incase it might be helpfull
---
the script that calculates distances can easy be found in the forum
-> look for the script "$gameMap.distance(x1, y1, x2, y2)"
more infos about that can be found here#9
If that solution can solve your problem, perhaps someone with better JS knowlegde than me can give you the proper JS step by step advice that is required.
( i am not really good in explaining JS stuff sry ) -
I think you could use a script that calculates the distance betwen events (or events&gameplayer).. and use a "if condition" that triggers with distance 0..
Thanks, but this doesn't address the actual problem, which is that jumping onto a spot behaves differently than walking onto a spot. What I'm looking for is a way to jump onto an event and trigger it in the same way as if you had "moved" onto it. -
If you have the destination coordinates
xandy, then you could try:
$gamePlayer.startMapEvent(x, y, [1, 2], false);
I.e. "start a map event atx,ywith trigger 1 or 2 (Player or Event Touch) that is not the same priority as the player (i.e. it's Below or Above characters)".
Unless you only want it to happen in specific situations, though, I'd recommend a plugin instead. -
@caethyril -- Yes! startMapEvent, that's what I was looking for. This has solved my problem, thanks!