[Solved] Item used only in certain area

Moksock

Villager
Member
Joined
Aug 20, 2013
Messages
28
Reaction score
1
First Language
English
Primarily Uses
RMMV
Well im hoping i finally managed to put this in the correct section.

I'm using RPG Maker MV.

What i'm trying to make happen is there is an item called an Hourglass in my game i'm making that i only want used in certain maps, now in the screenshots i've provided it shows the two common events i have set up in order to make this happen. The one event is tracking the players X & Y and is supposed to track their MapId and the other event is for the event to check if the MapId is the correct one and if it is to check which switch is on day or night, and then proceed with the following task of tinting or untinting the screen and turning off and on the opposing switch.

the problem is that when i try to use the hourglass no matter which map i'm on it just keeps saying "I cant use this item here" which is what i put in the "else" bracket of the conditional branch statement.

I'm hoping someone can help me fix my stupidity please.

Thank You
 

Attachments

Last edited:

Moksock

Villager
Member
Joined
Aug 20, 2013
Messages
28
Reaction score
1
First Language
English
Primarily Uses
RMMV
Never mind, I managed to fix my own problem, this can be closed
 

ozubon

surströmming?
Veteran
Joined
Oct 16, 2018
Messages
178
Reaction score
167
First Language
English
Primarily Uses
RMMV
Three tips you didn't ask for but can be helpful:
You don't need a parallel event running all the time to set those, you can check with the conditional branch script box whenever you need to like this:
JavaScript:
$gameMap.mapId() === 16
checks if Map ID is 16
and
JavaScript:
$gamePlayer.x === 20 && $gamePlayer.y === 21
checks if player x is 20 AND y is 21
20 and 21 are just examples, you replace it with what you wan to compare, or only use one of them without the &&.

If Day Hourglass and Night Hourglass always toggle with each other you only need one of those. Like when Day Hourglass is off/else it means the same thing as Night Hourglass being on. So just put what happens when Night Hourglass is on in Day Hourglass' else check.

What I mean is like, if you toggle a light switch you don't need to clarify you turn light off and darkness on, only the first is needed because it implies the other.

The reason it can be useful is because these sort of things declutter your event setups and make them easier to modify later and troubleshoot if something's not working.

Third tip is report your own thread and write solved as reason so it's less work for the mods ;)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts


:3c here's a thing i made a while while while back
Tried mochi for the first time. It's quite nice. Has a pleasant smell and taste, and is nice and chewy.
made a bio for the protag in my project!
Beggar : "I haven't eat for days..."
Kid : "Just do crime! You will get daily necessity for free in prison~"

Forum statistics

Threads
99,159
Messages
962,458
Members
130,726
Latest member
Milan1311
Top