Help with selecting key items?

Discussion in 'RPG Maker VX Ace' started by Roseredpinball, Jul 10, 2014.

Thread Status:
Not open for further replies.
  1. Roseredpinball

    Roseredpinball Veteran Veteran

    Messages:
    69
    Likes Received:
    13
    First Language:
    English
    Primarily Uses:
    RMVXA
    So, thanks to this helpful other thread: http://forums.rpgmakerweb.com/index.php?/topic/18927-need-help-with-using-items-at-specific-times/ I figured out to make my player choose an item at specific times I need to use the Select Key Item command. I have set up the variables, my only problem is connecting the item to the variables. What I want is for the player to purchase an item from the shop, and present it to an NPC to get a reaction. How can I set up Shop processing so that when the player purchases the specific item, the variable I set up is also increased to 1 for the purpose of later using the select key item command to check that the player has selected it? I have several possible items the player can purchase, so how can I ensure that only THAT specific item increases the variable? Thank you a lot for any advice you can offer me! Apologies if this is at all in the wrong section!

    On the request of another, I'll post these screenshots that will hopefully give you a better idea what my problem is. Thanks much everyone who has answered so far for your help!

    The first on is of the Key Item Select event, I have the 4th variable set to 013, the i believe, ID of my item, Bat Doll.

    The second is a screenshot of the actual event page. I'm actually having trouble getting it to work properly, if anyone could help me out with that, I'd be very thankful. What I want is to give the player the option to give multiple things which are viable, but only one of those three things will result in a point towards another variable I have set up, the girls' love interests.

    Finally, the third is of my item screen in  my database, to give you an idea what the items are assigned to which IDs. 

    Thanks for all your help! Especially Shaz whom has replied on multiple threads of mine and seems to be a very helpful member of the community!

    Screenshot1.png

    Screenshot2.png

    Screenshot3.png
     
    Last edited by a moderator: Jul 11, 2014
    #1
  2. Dacuna

    Dacuna Veteran Veteran

    Messages:
    143
    Likes Received:
    10
    First Language:
    English
    You could make it so that an event page only proceeds if the key item exists.

    If it must be an item, you could set up an event that adds one to a variable if the key item exists as well.

    If that doesn't work, you might be able to set up a common event, but that's pretty much only if you consume it.

    You can set that up in the database.
     
    Last edited by a moderator: Jul 10, 2014
    #2
  3. Andar

    Andar Veteran Veteran

    Messages:
    28,004
    Likes Received:
    6,327
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    I think you set up your variables in the wrong way - please provide a screenshot of your event.
    The select key item command returns the ID of the selected item into the variable - to learn how many of that item the player has in inventory is something else entirely.
     
    #3
  4. Shaz

    Shaz Veteran Veteran

    Messages:
    37,184
    Likes Received:
    11,053
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    You don't increase variables when you purchase items at a shop. You can use Control Variables to see how many of an item you've got. All of that has nothing to do with Select Key Item though.
     
    #4
  5. Tommy Gun

    Tommy Gun ♩ ♪ ♫ ♬ Veteran

    Messages:
    385
    Likes Received:
    120
    First Language:
    English
    Here's my video tutorial on Key Items -- it kind of sounds like you're using them wrong, so this may help you figure out how to get it to work (apologies if I misunderstood your post).
     
    Last edited by a moderator: Jul 11, 2014
    #5
  6. Roseredpinball

    Roseredpinball Veteran Veteran

    Messages:
    69
    Likes Received:
    13
    First Language:
    English
    Primarily Uses:
    RMVXA
    Thank you much for this tutorial, and answering my question.

    I have followed your instructions, but for some reason the character won't accept the gift anyway. You could sorta say I'm doing kinda like a dating game.

    Here is a screenshot of my set up, if you could help me anymore I'd really appreciate it and I really appreciate your and everyone else's help so far.

    Okay, so I've changed my variables to have proper names, they were confusing me, too. Hopefully this will help.

    Screenshot.png
     
    Last edited by a moderator: Jul 12, 2014
    #6
  7. Andar

    Andar Veteran Veteran

    Messages:
    28,004
    Likes Received:
    6,327
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    what are variables 5 and 6 used for? they make no sense, and you should give them proper names instead of useless numbers as names.


    And where do you check variable 4 for the correct item? you only check it for the wrong item (item-ID 14), but never check it for the correct item (at least not in that part of the event that is visible in the screenshot)


    Edit:


    I made a picture on how you use the select key item command and then check which of three items (with ID's 1,2,3) has been selected by the player.


    Edit 2:


    Your corrected picture shows your mistake - variables 5 and 6 are still useless, because they never were set.


    All your conditional branches need to check the variable used in the select key item command, NOT random variables named for items you have.


    See the picture I attached

    selectkeyitem.png
     
    Last edited by a moderator: Jul 12, 2014
    #7
  8. Roseredpinball

    Roseredpinball Veteran Veteran

    Messages:
    69
    Likes Received:
    13
    First Language:
    English
    Primarily Uses:
    RMVXA
    OH MY GOD IT WORKS.Thank you sooooo much for your help! Really, I can't thank you enough! And the other people that helped me, thank you so much too, thank you guys so much for being patient with me and teaching a newbie how to use select key item. (I mean I'm not really a newbie, but im a newbie when it comes to select key item and some other commands.) Thank you a lot! Especially the guy with the video and Andar, you guys really helped me!
     
    #8
  9. Andar

    Andar Veteran Veteran

    Messages:
    28,004
    Likes Received:
    6,327
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    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.
     
    #9
Thread Status:
Not open for further replies.

Share This Page