Hello everyone,
first thing first, I hope this post is not in the wrong section as I need help specifically with MV and if it isn't I'm sorry, it was not intentional.
What I'm trying to do is creating a "trap" kind of event that produces a subtle visual and auditory cue before "triggering", basically playing an animation on its own tile and checking if the player is there. If the player's X and Y correspond with the event's X and Y, I want it to move the player to another tile inside the same map.
Obviously, I can't simply do Transfer player on the current map with two randomly rolled position because I can end up with unwalkable tiles.
I assume that there's some script call to do:
Of course, I know that these are not actual methods from RPGMV, so, is there some way to achieve what I want without recurring to writing my own checker function?
Unfortunately, transferring the player to a static set of position is not really possible because I'm planning to call this common event from multiple maps which might have very different layout.
first thing first, I hope this post is not in the wrong section as I need help specifically with MV and if it isn't I'm sorry, it was not intentional.
What I'm trying to do is creating a "trap" kind of event that produces a subtle visual and auditory cue before "triggering", basically playing an animation on its own tile and checking if the player is there. If the player's X and Y correspond with the event's X and Y, I want it to move the player to another tile inside the same map.
Obviously, I can't simply do Transfer player on the current map with two randomly rolled position because I can end up with unwalkable tiles.
I assume that there's some script call to do:
newX = Math.floor(Math.random() * (mapSizeX + 1));newY = Math.floor(Math.random() * (mapSizeY + 1));while (!map.isWalkable(newX, newY) { newX = Math.floor(Math.random() * (mapSizeX + 1)); newY = Math.floor(Math.random() * (mapSizeY + 1));}transferPlayer(newX, newY);Of course, I know that these are not actual methods from RPGMV, so, is there some way to achieve what I want without recurring to writing my own checker function?
Unfortunately, transferring the player to a static set of position is not really possible because I'm planning to call this common event from multiple maps which might have very different layout.