pkdarmstrong

Villager
Member
Joined
Feb 19, 2015
Messages
27
Reaction score
1
First Language
English
Recently downloaded MV and had some trouble with script calls, but thankfully Archeia posted the new list of script calls for MV.

Link

However, there are a couple of script calls present from in VXA (reference VXA script call collection here) that are not present in MV.

$game_player.region_id == n
$game_map.events[event_id].region_id == n


I am essentially working on a Sokoban-esque puzzle game where I'm using Region IDs over switches, so IF Player 1 or 2 is over Region ID 'A', THEN activate switch 'A'. I'm having trouble eventing this, especially if and when I'm using one of the "Players" as an event instead of a second controllable player.

Any possible solution would be great, I'd hate to hear that MV has a reduced amount of features. 

Thanks!  BD
 

Baka-chan

☆*:.。. o(≧▽≦)o .。.:*☆
Veteran
Joined
Dec 19, 2012
Messages
490
Reaction score
149
First Language
German
You can use $gameMap.regionId($gamePlayer.x, $gamePlayer.y) === n to check if the player is on region n. Don't know how to get the event x,y but you could save the event x,y in variables via the change variable command and then check $gameMap.regionId($gameVariables.value(x), $gameVariables.value(y)) === n (I'm sure there's a better way to get the x and y of an event that's the only way I got it to work so far).

Edit:

For Events use

$gameMap.regionId($gameMap.event(m).x, $gameMap.event(m).y) === n

N = Region ID

M = Event ID (if you are looking for the x, y of another event) or this._eventId (for the current event)
 
Last edited by a moderator:

pkdarmstrong

Villager
Member
Joined
Feb 19, 2015
Messages
27
Reaction score
1
First Language
English
You can use $gameMap.regionId($gamePlayer.x, $gamePlayer.y) === n to check if the player is on region n. Don't know how to get the event x,y but you could save the event x,y in variables via the change variable command and then check $gameMap.regionId($gameVariables.value(x), $gameVariables.value(y)) === n (I'm sure there's a better way to get the x and y of an event that's the only way I got it to work so far).
That works wonders! Thank you so much Baka-chan, I'll mark this thread as solved.
 

Baka-chan

☆*:.。. o(≧▽≦)o .。.:*☆
Veteran
Joined
Dec 19, 2012
Messages
490
Reaction score
149
First Language
German
Last edited by a moderator:

Latest Threads

Latest Profile Posts

What props/tiles are missing from this scene?

My team recruitment thread is finally online. Please, if you guys are interested in language learning, take a look. Even if you don't join, a word of encouragement is always welcome.
Rats! These Rats are pretty cute!

can I say the opposite of "tech savvy" is "tech noob" ?
Anyone else see the word pixijs and think they forgot how to read?

Forum statistics

Threads
116,469
Messages
1,098,889
Members
152,051
Latest member
haworix4
Top