This works fine 90% of the time, except for when the entity jumps onto the water or off the edge or onto a roof, is there a way to stop the jump from accessing such areas?
First time using RMMZ and like maybe 2 weeks in? so idk if im being a newb or not..
Hmm, maybe adding region variable to the mix?
Dunno if it would work but you could try to make a 3rd variable, 321 wich calls the region ID, and then its jump on X = 320 / Y = 319 / REGION ID 1 = 321....
Youd need to map it out where its possible to jump ofc... should work, not sure tho.
Edit: forgot to mention, if that code uses the same "jump" mechanic like in the programm, then it wont jump to those coordinates from the variable but rather it will jump so many blocks.
lets say if the variable says x5 and y6, then the event wont jump to bloc x5y6 but it will jump 5 blocks to the right (x) and 6 down (y).
You could try and check if the target coordinates are passable or not:
JavaScript:
const x = $gameVariables.value(320);
const y = $gameVariables.value(319);
if ([2, 4, 6, 8].some(direction => $gameMap.isPassable(x, y, direction))) {
$gameMap.event(this._eventId).jump(x, y);
}
This checks if the target is passable from any of the 4 possible directions. If it is, the jump is executed. At the very least, this will stop your event from jumping into the water (assuming water is not passable). Whether it can still jump onto a roof depends on whether the roof is passable, of course.
I could be wrong, since I just kinda skimmed over it, but I think that Eli Jump System is supposed to help with these types of situations. Otherwise, I'd bet that Yanfly's Smart Jump would work with FOSSIL.
But the snippet that Nolonar posted would likely work for what you're trying to do, and if not, it'd be easy to modify to behave the way you want.
JABS - J's Action Battle System J / JE / Jragyn v3.0.0 Introduction Using this engine will enable you, the RM dev, to create a game where battles take place in real-time on the map between the player (with their allies if they wish) and the enemy. Interactions between enemies are by-design...
forums.rpgmakerweb.com
which works flawlessly, I set a slime boss up to spawn smaller slimes with
FEATURES Spawn events from a specified map onto other maps at the location you choose or to a random region tile on the map. Specify if you need the spawned events to be temporary (disappear when t…
galvs-scripts.com
Again that works flawlessly, but i wanted them to jump out from the boss to random coordinates.. the boss dies and sets his event ID into 2 vars..
I tried the above idea, but I imagine since my jump vars are randomed from -3/+3 for x and y
that may be why the above suggestion isnt working, they still jump onto the roof of the dungeon..
Smart jump 100% probably would help but the only version avail is MV
I 'm trying to manipulate Eli's jump, I set the event to parallel process to run the Plugin command:
"0 - he says is for 'this event'"
"Coordinates allow for \v[] for x,y, so i use that... but sticking a static number is yields the same error"
"jump peak 1"
*Edit* also I noticed with Eli's that if i setup an event in map, Label his ID with the event ID, hard set the coordinates, and height, it works but the mob jumps into the blocked region still... and this wont support what I was needing, since the coordinates and event ID have to be hardset.
I could be wrong, since I just kinda skimmed over it, but I think that Eli Jump System is supposed to help with these types of situations. Otherwise, I'd bet that Yanfly's Smart Jump would work with FOSSIL.
But the snippet that Nolonar posted would likely work for what you're trying to do, and if not, it'd be easy to modify to behave the way you want.
You could try and check if the target coordinates are passable or not:
JavaScript:
const x = $gameVariables.value(320);
const y = $gameVariables.value(319);
if ([2, 4, 6, 8].some(direction => $gameMap.isPassable(x, y, direction))) {
$gameMap.event(this._eventId).jump(x, y);
}
This checks if the target is passable from any of the 4 possible directions. If it is, the jump is executed. At the very least, this will stop your event from jumping into the water (assuming water is not passable). Whether it can still jump onto a roof depends on whether the roof is passable, of course.
Hmm, maybe adding region variable to the mix?
Dunno if it would work but you could try to make a 3rd variable, 321 wich calls the region ID, and then its jump on X = 320 / Y = 319 / REGION ID 1 = 321....
Youd need to map it out where its possible to jump ofc... should work, not sure tho.
Edit: forgot to mention, if that code uses the same "jump" mechanic like in the programm, then it wont jump to those coordinates from the variable but rather it will jump so many blocks.
lets say if the variable says x5 and y6, then the event wont jump to bloc x5y6 but it will jump 5 blocks to the right (x) and 6 down (y).
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.