Make using an item perform a region check, then activate event?

Skwis

Villager
Member
Joined
Sep 21, 2020
Messages
18
Reaction score
6
First Language
English
Primarily Uses
RMMZ
I'm making a quest where you have to be a photographer.

When you "use" the camera item in your inventory, I want it to check if you're on a region.
If player uses the camera item while standing on region 1, this is a good photo and window will pop up saying good job.
If player uses the camera item while standing on region 2, this is a bad photo and window will pop up saying try again.

How do I make that happen?
 

ShadowDragon

Realist
Veteran
Joined
Oct 8, 2018
Messages
4,011
Reaction score
1,523
First Language
Dutch
Primarily Uses
RMMV
I rather would making it an event based than a region based, or to say, some visible
marking spots to reconize when keybutton "camera button" is pressed, it will check
if he is on the event, else, it's not a nice spot to take a foto.

there might be other methodes as well,but it depends which one is best.

for region based you can try a condition in parallel process:

if: region = 1
this seems a nice spot for a foto, take foto?
yes/no choices or whatever

else
this isn't a nice spot to take a foto, let's find another spot
end

you dont need multiple regions for what is a good spot and which does not,
but you can use it if you need multiple foto's in a progression.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,900
Reaction score
8,245
First Language
German
Primarily Uses
RMMV
I'll give a few more details because your post doesn't indicate how much of the engine you know.

As the poster above said there are basically two ways to do this, depending on what exactly you want to do.
the first way is to place events where the player can make photos and have them check if he has the required items (camera) and give answers depending on whatever conditions you think of.
This is the easier way, but it only works if the positions are few per map as each position needs another event there

the second way is to attach a common event to an item (the camera) and whenever the item is used, the common event checks the current position and gets its region ID (control variable and get location info) and then determines based on the region ID what to do.
This will require you to handle variables in the event, something a lot of the younger people using RM have problems with.
 

Skwis

Villager
Member
Joined
Sep 21, 2020
Messages
18
Reaction score
6
First Language
English
Primarily Uses
RMMZ
You're right, it would be easier to use events. I have a good understanding of how events work so I can make the quest work correctly with them. I was only hoping I could avoid copying and pasting the same event a couple dozen times for the region of the map where a good/bad photo would occur.

I'll do that for now, and then look up tutorials for how to use variables and region checks and if I get the quest working correctly with those I'll update this thread.

Thank you both!
 

Quexp

Lifelong Learner
Veteran
Joined
Jun 18, 2018
Messages
437
Reaction score
886
First Language
English
Primarily Uses
RMMV
I have no advice to offer but just want to say this is such a cool idea!
 

Latest Threads

Latest Posts

Latest Profile Posts

Make a Game in RMMZ Streams are going to remain in hiatus this week. Too much to do! 4 things will be announced on Monday though! Look forward to that.
Typed a long-ish reply to a post... forgot to actually HIT the post button, and moved to a different page.... finally noticed, don't remember what all I had typed and don't feel like trying to re-type it all.... smh....
Their tactics are evolving. They've learned to call for help when cornered. Never trust a mammal!
Good morning all. I still have a post up on video editing for cinematic trailers. Please make sure to check that out and give me a message as its still active in offers.
Hey everyone! I'm back :D

Snow White? More like Snowhere to be seen amiright? Hahaha I'm so sorry!! :kaocry:

Forum statistics

Threads
112,371
Messages
1,067,841
Members
146,017
Latest member
Anselmo00
Top