Question about using items and having a party member comment on the item

( Eeek, sorry if the answer to this turns out being something simple! )


I've been looking around google and the forums to see if I could find my answer, but I haven't found anything quite like what I wanted to do. First, how can you select an item in your inventory and have a pop-up come up asking whether or not you want to use the item? 


And my next question is: Lets say that the item that asked you if you wanted to use it is key that can be used to open a specific door. However, you can use this item wherever, even if its not at the correct location. If you use this item at the correct location, this item will do what it's supposed to do. I also want to make it so that if you use the item outside of where it's supposed to be used, a dialogue will come up of actor 2 saying something like, "What are you trying to do with that key?" or like "Waving that key around isn't going to do anything."


Hopefully I was clear, I know I can start rambling when I'm typing out what I'm thinking lol
Set the item to NOT be consumable, and attach a common event to it via the Effects box.  Add your conditions and responses in the common event.
Set the item to NOT be consumable, and attach a common event to it via the Effects box.  Add your conditions and responses in the common event.



Thank you for the answer! Wow, that turned out to be really simple haha, I'm sorry about that ;;;


I do want to ask one more thing for clarification though. When using the item in the correct location, what conditions would I have to assign on it to open a door? Sorry if that's a dumb question!
You can use Control Variables to get the map ID and player's X and Y location into variables, and then do nested conditions to see if the map ID is correct and the X and Y variables are correct, based on where the player SHOULD be standing in order to use it on the correct object.


If you don't mind the selection happening differently in the 'right' spot, you could also set the item up as a Key Item, then when they interact with the door, use the Select Key Item command, which would show all the key items currently held, let the player select one, and set a variable to the item id of whatever they selected.  Then you just do a condition to see if the variable is the correct item id for the door.
You can use Control Variables to get the map ID and player's X and Y location into variables, and then do nested conditions to see if the map ID is correct and the X and Y variables are correct, based on where the player SHOULD be standing in order to use it on the correct object.



Alrighty, I'm sorry for being really noobish, but you lost me a bit here. So for the control variable, should it look like this? 

Spoiler
149ec71709cd96ba9f116b5bc7abbdd1.png



And then from there when I set up the conditional else branch in the common event, how do I put in the specific coordinates of the locked door the item needs to be used on? And thanks so much for your time!! Sorry if I'm being a pain with all the questions haha
No, you need 3 variables.

Code:
Control Variables: Map ID = Game Data > Map Id
Control Variables: Player X = Game Data > Player's X
Control Variables: Player Y = Game Data > Player's Y

Conditional Branch: Variable (Map ID) = 15
  Conditional Branch: Variable (Player X) = 7
    Conditional Branch: Variable (Player Y) = 12
      Conditional Branch: Player is facing UP
        (okay to use key, remove it from inventory if you don't want them to hang onto it)
        Exit Event Processing
      Branch End
    Branch End
  Branch End
Branch End

Show Text: Actor2: I don't know what you think you're going to do with that key here!
(because you did Exit Event Processing if they were in the right place, the line above will be skipped if the key can be used.
If ANY of the conditions above are not true, it'll fall through to here and display that line of text)
Oh, okay, I get it now! Thank you so, so much Shaz!! You're a life saver, and Happy New Years!!  😀

Original thread: https://forums.rpgmakerweb.com/threads/question-about-using-items-and-having-a-party-member-comment-on-the-item.72977/