Posible to get tag in scrip?

I want to know if it's posible to get tag (comment) from the script line.


For exemple, in my map tag(comment) I put the ID of a map over and lower.


if player use a stair, the script will make him tp to the lower or over map at the exact same position.


Thy have many way to use it.


Also I want to know how to get current region id by script, my old method seem to stop worked.
Check the help file for the meta command - that is a script command to load data from a notetag in a specific format and provided by the engine.


To use other notetag formats, you'll have to write your own script sequence for checking and analysing the notebox.


Also check the forum, there is a topic that lists the script equivalent of all event commands - and you're probably looking for the script equivalent of the get location info command, which is used to load the region ID by event command.
Thanks for your reply.


I cliked on help that that hoppen me a webpage. I found no place the about meta command. I guess I use the wrong place...


For the script event equivalent... they have no way to get region_id by event command. Script must be used. 


I found this: $gameMap.regionId($gamePlayer.x,$gamePlayer.y)


But im surprise that rpg maker did't provice direct way to get player current region_id.


Basicly what i try to do(and it's already almost working but ugly) it's to put insid notetag the id of the map over and the map under the current map(like a tower).


As all my map was proportional in dimention. If I put ID 61, that will automaticly teleport player to the lower map(62 for upper). 


I use yenfi engire for trigger common_event by region_id.


My current code as join in image.


I had to put directly the lower map id 19 because I did't know yet how get it from notetag. I will continu to try to find it, but help will be appreciate.

screenshot.png
The Help file is a local file that is only opened by a browser.


And the access to the metadata is described under plugin specifications

For the script event equivalent... they have no way to get region_id by event command. Script must be used. 



That is absolutely wrong - of course you can get the region ID by events alone - see the attached screenshot, that shows how you get the region ID on the player position without any single script command.


regionID.png


The first two commands use the game data option of control variable - only not to load the map id, but the player positions.


The third command loads the region ID into the variable "Temp ID"
What???? I never see get location Info before! Great! Thanks that will be usefull.


But using stript I found this more usefull because it's avoid using variable:


$gamePlayer.reserveTransfer(19, $gamePlayer.x, $gamePlayer.y, 4, 0);


By the way, it's really faster using script?


The only problem left, it's how to replace the 19.


19 is the ID of the map under the current map.


I want to put this information on the map tag, but did't find yet a way to get this info.
That is exactly what the metadata is intended for.


You'll place notetags


<down:17>


<up:14>


and use the meta-function to load those numbers and compare them.


Still needs a bit more to handle, but that is why I pointed you to where in the help file that is described (above the quote in my last post)
Thanks, I found the place in documentation. But if I understand it corectly, I must create a pluggin for get value?
A plugin is nothing but a script in an external textfile - most commands usable in a plugin will also work in a script box or -line.


There are differences, but if those come into play you'll need to know how to do object-oriented programming, and that is nothing explained in a few sentences...
Im a programmer, but never used javascript so much. So I guess I will have to give a projet for thaté

Original thread: https://forums.rpgmakerweb.com/threads/posible-to-get-tag-in-scrip.73735/