Restricting a skill to a specific map

I'm looking for a way to have a skill show up only on one map, tried playing with a conditional map iD event... but well now i'm here ^^


It's a teleport to safe place Skill, but it should only be accessible on a specific map, but "Map Id =" is not available in the conditional branch


Ooooh, genius stroke :


I could use Custom eval (YF skill core) ; i just need the syntax for "map ID = 5"


<Custom Show Eval>


if (XXXXXXX) {


visible = true;


} else {


visible = false;


}


</Custom Show Eval>
A simple solution might be:


On the transfer event into that map, use the 'learn skill' command for that actor.


On the transfer event out of that map, use the 'forget skill' command.
Yeah except the skill is only accessible on the world map, i thought about your way too, but i would have to insert that into every transfer event in and out of that world map (basically 90% of the transfers)


Giving the skil, but simply not showing it with Custom show eval feels "cleaner"


Can i use " $gameMap._mapId " in my formula, or is it only for script calls ?
Why can't you just use control variables > game data >map ID and then check the variable in your conditionnal?


But yes, $gameMap._mapId should work in your formula.
Because, while i knew it existed, and had just used it, i didn't make the connexion with the variable check


It's like knowing the words, but not being able to use them in a sentence


Thanks for this new connexion in my Js


Problem solved

Original thread: https://forums.rpgmakerweb.com/threads/restricting-a-skill-to-a-specific-map.73154/