[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

  • Player location MapId.png
    Player location MapId.png
    105.5 KB · Views: 6
  • Hourglass Part 1.png
    Hourglass Part 1.png
    160.8 KB · Views: 7
  • Hourglass Part 2.png
    Hourglass Part 2.png
    137.3 KB · Views: 7
  • Hourglass Part 3.png
    Hourglass Part 3.png
    128.4 KB · Views: 7
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
168
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 ;)
 

Latest Threads

Latest Posts

Latest Profile Posts

I feel like banging my head against a wall every time I want to find that post that shows all the plugin header codes. Then I think "next time I find it, I'm going to bookmark it". Then I think "wait a minute ... maybe I bookmarked it last time because it took me so long to find it". Check bookmarks, and there it is :)
... a few of my main characters standing around doing nothing lol. I mostly wanted to see them together on screen.
Today I drove through my city of 100,000+ people during rush hour and the streets were nearly empty. Just so I could go get my favorite burger. There a dental assistant (she said that's her other job, even though I didn't ask) took my order and handed me a burger. I know it's bad out there... But wow, she's either atrocious with her money, or "it really be like that".

Forum statistics

Threads
107,816
Messages
1,032,412
Members
139,965
Latest member
specscart
Top