Need help sprite giving you item

Your event is not correct.


You're saying if the player chooses the pendant, then your NPC will give the ring to the player.  You've got it the wrong way around.  It should be something like this:

Code:
Select Key Item: [0001: key item]
Conditional Branch: Variable [0001: key item] == 18 
  # player selects the ring from inventory
  Show Text: Thank you for finding my ring. Here is a pendant as a reward.
  Change Items: Ring - 1
  Change Items: Pendant + 1
Branch End

If the player chooses the ring from the list of items, then the ring will be removed (you're giving it back to the NPC), and you get a pendant.

trying this now. Where do you find the: Where in the Events Commands?

Code:
# player selects the ring from inventory
That is a comment. Shaz just put it in there for clarification, and you don't actually put it in your event commands. 
everyone is so helpful on here, thank you. 🙂
Ok it seems to work now, the item now appears. But it still not appearing in the items inventory? would it be better for me to disable the items for the menu? like when i talk to another sprite i plan on giving him/her the pendent. I be only doing 1 item at a time you need to give to a person or a sprite gives to you.


done.JPG


Note: I have only keeped the items, save, game end. As this will be a non-combat game.


done2.JPG


done3.JPG


done4.JPG


This work Now. But on items menu nothing appears, but when i talk with the sprite in cemetery the pendent item is there.

editevent.JPG
How do you have your item set up?  If it's set to a Key item it may not show up.  You could change it to a regular item and set the price to 0, which would stop the player being able to sell it.  Or, if you've made changes to your item script so it only shows one tab (no key items), that could be the problem.  Your event is correct, and the pendant is definitely being added to inventory.


I think it's the latter - you've got a modified Items menu that doesn't let you see key items.  I'd look at either changing it so the Key Items tab is back again, or the Items lists ALL the items and doesn't exclude key items.
How do you have your item set up?  If it's set to a Key item it may not show up.  You could change it to a regular item and set the price to 0, which would stop the player being able to sell it.  Or, if you've made changes to your item script so it only shows one tab (no key items), that could be the problem.  Your event is correct, and the pendant is definitely being added to inventory.


I think it's the latter - you've got a modified Items menu that doesn't let you see key items.  I'd look at either changing it so the Key Items tab is back again, or the Items lists ALL the items and doesn't exclude key items.



here are edits:

scripteditor1.JPG

scripteditor2.JPG
You need to uncomment line 45 of Window_ItemCategory: add_command(Vocab::key_item, :key_item)
ok it worked it was disabled in my script. But it has that mp/hp and that default character pic on it. As my game will be a non-combat game i don't find any use for those MP/HP on the screen. Besides when i get an item for example, in my game i had a locked door for a house and i had to go and find the key to unlock the house i then obtained the key and opened the door without going to inventory to choose key or items.
Enable key item on the script (last screen shot)


Edit:Lol was on mobile didn't see the update
ok it worked it was disabled in my script. But it has that mp/hp and that default character pic on it. As my game will be a non-combat game i don't find any use for those MP/HP on the screen. Besides when i get an item for example, in my game i had a locked door for a house and i had to go and find the key to unlock the house i then obtained the key and opened the door without going to inventory to choose key or items.



What "has that mp/hp and that default character pic on it"?  The item screen and key items doesn't.


How 'bout we stick with one problem at a time.  You've got one in the thread, and now you've just mentioned two more.  Stick with one issue per thread, and when it's resolved, the thread will be closed.  If we start talking about the mp/hp thing here, and the issue with the door being unlocked, that's just going to confuse everything.  Start a new thread for those.  The mp/hp thing needs to go in Script Requests or Script Support, and the unlocking the house needs to go into Ace Support.  Make sure you include screenshots of your door event - if it has more than one tab, include shots of each one (with all the conditions and tab order and stuff).


As far as I know, uncommenting that line in the script should now resolve this particular issue - the NPC should check that you've got the ring, give you the pendant, and you should be able to see the pendant in your Key Items in the menu.  Is that correct, or is it still not working?
Still working on it sorry but i am trying to now give this pendent that i recieved from the men in cemetery to a women, I will give the women sprite the pendent then the women will give me a key. But when i give the pendent to the women it does nothing as before.


pendent.JPG


oldkey.JPG


Conitional Branch to 001 which is the pendent


then i put the change items to pendent


then Old Key.


But when i give the pendent to women sprite it doesn't list the old key.


pendent00002.JPG


pendent0001.JPG


After giving her the pendent the old key doesn't show up.
Ok you can close this topic now as my gameplay now only involves getting keys and items from chests and not people. As now i know how to get things from chests. I can close this topic now.
cyberfox2016, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.


You can go back and edit your post if you need to add more.


Just a couple of notes before I close this: Getting items from/giving items to the player from chests or people is the same. The graphic is the only difference. So if you can work it from a chest, just put a people graphic there instead.


Also, a lot of what you are having trouble with are really very basic elements of working with Ace. I strongly recommend you look through some basic tutorials. Andar has this available, as well as some other helps in his signature. It's a good place to start.

Original thread: https://forums.rpgmakerweb.com/threads/need-help-sprite-giving-you-item.68224/