Okay I've googled around, and I have not found an answer at ALL. I'm not really sure WHAT to call it but, I'm trying to make a horror game of sorts and I can't figure out for the life of me how to do this.
What I want to do is have it so, you can open your inventory and use an item, but if you use the item say, for example, you use the item "Key" while standing in front of a cave, it says "You cannot use the item this way" or something like that, but if you use the "Key" while standing in front of the correct door, it says like "Door unlocked" And it lets you through, and the key disappears. I already know you can use conditional branches to just let you through, but I don't want that...I plan on using it for future puzzles that actually involve the player to think. Like say, using a shovel on the ground, or using the hammer on a wall.
Please please please someone help me..
A little bit additional info:
You're trying to make an item that can be used anywhere, but the result will only happen in specific situations or positions.
Usually the games with RM work the other way around, that' what Shaz explained: you place an event in the specific position or situation, and when the player starts the interaction with the event it will check or ask for existing items.
Both approaches can be done, but which one to choose depends on what you want to do.
If that is a key only usable on specific doors or something like that, you should make the door an event checking for the item.
If the item is something that can be used almost everywhere (like a showel to dig in the ground), then you make that item call a common event, and have that event check the position of the player to decide what to do. That check should be done using region-ID or terrain-tag, if it should have results in many places (planting a seed) and specific coordinate checks if you're looking for a rare result (digging up a treasure)
OH, I'm so sorry! I'll remember that thank you, and uhm, I get how to add it now, but I'm not sure what to add to make it do what Andar said..
It depends on the item, and how and where it will be used. Give us details about exactly what you want to achieve with this item, and we'll tell you how to do it. Note, Andar said a common event was best for an item that can be used almost anywhere. This would NOT apply to using a key to unlock a door, or a hammer to break something.
Er, well, I just need an example and I'll be able to base other things off of it. I'd just like to know how you make it check your location, and if it's the correct location, a reaction happens. For example, what he said about the thing with the shovel. Sorry if I'm asking too many questions or not being clear enough..
If you want to be able to use an item anywhere and see if something happens, go to the region layer on the map, choose a region number that will ONLY be used for that purpose (I add a 'documentation' script right at the top, where I list region ids, terrain tags, etc, that I've used, and for what purpose, so I don't accidentally use the same one for different things, which would cause problems). Then paint using that region ID on any tile where you want the player to be able to use that item.
Then in your common event for that item, use Control Variables to get the player's X and Y positions into two variables, and then use the Get Location Info command (third tab of event commands) to get the region id into yet another variable, using the previous two variables as location designators.
You don't have to use regions. If you want to say a particular tile is the 'target' (let's say you have a mound of dirt in your tileset) and the player can dig there, you could get the tile ID into the variable instead of the region id. Or you could set your tileset to give that tile a specific terrain tag, then the Get Location Info command will return the terrain tag of the tile under the player.
Oh my gosh, that's perfect, thank you soo much! One last question, what do I do if I want it to have multiple reactions, like she finds 10 gold in some areas, but in like two or three areas she finds 100 gold. I toyed with it, but I can't seem to figure it out.
Ahh, thank you soooo much! You've been sooo helpful, I thank you endlessly!
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.