regionid

I only found this code for checking the regionid of a event:  $gameMap.regionId($gameMap.event(this._eventId).x, $gameMap.event(this._eventId).y) === 43


it's look like long for nothing. I can't do this.regionid? Any shorter way? thanks
This tutorial explains it quite well ^^


http://blog.rpgmakerweb.com/tutorials/tutorial-using-regionid-in-events/?utm_source=forum&utm_medium=social&utm_campaign=regionID
Sadly there is no way to shorten that script call (or at least I too found none), except by doing it via event commands like in the excellent tutorial provided by Iliketea.


May I interest you in my plugin? It aims to provide script box commands to call, in order to shorten script calls, and it has just the function you need.


For example your call would become 


event_regionC(event_id(),43)


You can find it here:


http://forums.rpgmakerweb.com/index.php?/topic/62926-event-making-script-box-functions-v-033-06062016/
Yes, there is a way to shorten it.


I'm assuming that's a script call within a conditional branch - the command would change depending on where you're calling it from


You can use this:

Code:
this.character(0).regionId() === 43

This is because Game_CharacterBase also has a regionId function, that calls the $gameMap.regionId(x, y) function for you, so you don't have to pass the location.  When called from Game_Interpreter, this.character(0) returns the event that's currently running.


You can also do this:

Code:
$gamePlayer.regionId() === 43
Thanks to everybody for your help. Shaz your answer are incredible. You alway provide exceptional great answer!


Im sad that I can't have you all the time =:0) By the way I replyed in a topic about objet push.


Somebody tell me that they have acript call for get the last regionid, it's true?
not sure what you mean
they have 

Code:
$gamePlayer.regionId()

but apparently 


$gamePlayer.lastregionID() exist too.


ANyway I found a solution for solve my problem another way.

Original thread: https://forums.rpgmakerweb.com/threads/regionid.63098/