[RGP MZ] Map verification (Script or plugin)

I created a resource to collect that I put on different maps, and depending on the map the player is on, the player gives you a different object, not the same object. (each map has a different variable)

It is a common event. It is a self-spamming event.

I know it's simple but I need if someone knows the script to verify if the player is on the map.


🙂
I tried this but it doesn't work
Script: ThePlayerIsOn(1) (Conditional derivation)
Not sure I understand what you're asking. You can use the Control Variables event command to set the ID of the current map to a variable, and then use a Conditional Branch event command in your common event to do something based on the ID of the map.

You don't need to verify if the player is on the map. There is only one map active at one time.
Aside from the true things Kenen said, I don't understand the point of your plugin.

Why make a function that performs one operation? Just Control Variable then Conditional Branch, as stated above.

Or, if you want to use code and be more efficient, why make the function and plugin file instead of just pasting that into Conditional Branch's Script field? $gameMap.mapId() == 4 or whatever.

Script: ThePlayerIsOn(1) (Conditional derivation)
If that's an example of how you're trying to call the function, that's incorrect syntax for your own code.
Not sure I understand what you're asking. You can use the Control Variables event command to set the ID of the current map to a variable, and then use a Conditional Branch event command in your common event to do something based on the ID of the map.

You don't need to verify if the player is on the map. There is only one map active at one time.
You clarified my mind, it hadn't occurred to me about the variables, yes, that's it, I know how I'll do it... that's why I said it was nonsense.
Aside from the true things Kenen said, I don't understand the point of your plugin.

Why make a function that performs one operation? Just Control Variable then Conditional Branch, as stated above.

Or, if you want to use code and be more efficient, why make the function and plugin file instead of just pasting that into Conditional Branch's Script field? $gameMap.mapId() == 4 or whatever.


If that's an example of how you're trying to call the function, that's incorrect syntax for your own code.
That thing about the variables hadn't occurred to me, plus that thing about the plugin... they were desperate methods xd, but I already solved it

Original thread: https://forums.rpgmakerweb.com/threads/rgp-mz-map-verification-script-or-plugin.168521/