How do i make an item in rpg maker so that i can't sell it?
Set the price of the item to 0. I'm pretty sure that does it.
What do you mean?
Like, have the item in the shop, but not be able to buy it?
And Vince, that just makes it so it's free.
....
No one ever tries to figure things out on their own.
Key Items.
Quote from: Anthony on May 27, 2007, 08:33:04 PM
And Vince, that just makes it so it's free.
Really? It worked on my game... :-\
I'm gonna try it again...
EDIT: Crap... You were right... :-[EDIT EDIT: Never mind... I think it worked...
Quote from: Anthony on May 27, 2007, 08:33:04 PM
What do you mean?
Like, have the item in the shop, but not be able to buy it?
And Vince, that just makes it so it's free.
No, he means have the item in the inventory, and not being able to sell it in the shop.
For the guy above me, I dunno what yer talkin' about, but I made a new item called Key Item and set the price to 0, and I couldn't sell it in the shop. So that works, with RMXP at least. Of course if ye make the item buyable in the shop you'll get the item for free.
Don't know why I said Key Items, must have been some script.
Price 0 is correct, it will be free, but unable to be sold.
But what if you ant to buy it?
Make a common event and remove the item that's buy able then replace it with the one set to zero.
Wait... I was right? ???
Gah, I'm gonna have to try it out again! :mad:
Quote from: Anthony on May 29, 2007, 04:36:31 PM
But what if you ant to buy it?
Make a common event and remove the item that's buy able then replace it with the one set to zero.
Why put an item in the shop if you dont want players to buy it in the first place?
Quote from: Edwin VanCleef on May 29, 2007, 04:59:10 PM
Quote from: Anthony on May 29, 2007, 04:36:31 PM
But what if you ant to buy it?
Make a common event and remove the item that's buy able then replace it with the one set to zero.
Why put an item in the shop if you dont want players to buy it in the first place?
No, I think he wants to make it non sell able.
Yes of course, I understand that and the solution is already given,. But you brought up the buy case so I replied.
I didn't know what he wanted at first. I was mistaken.
What you do:
Make the item that's buy able.
Make the item that's not sell able.
Of course, name them the same thing.
Make a common event for the buy able one.
Do a conditional branch to check if the buy able item is in the inventory.
Then, make it so that if it is in the inventory it removes it and replaces it with the right item. The sell able one.
But make sure you set the common event to parallel process and have a call common event in the area where you can buy it. And set the call common event to parallel process too.
EDIT:
Wait, try this:
Common event:
Remove [sell able item]
Add [non sell able item]
And link that to the buy able item. So that's easier than doing the conditional branch. I dunno if any of those will work because they're all from memory. I'll check later.
Why prevent them from selling it if they can buy it anyway?
If you actually do want them to be able to buy the item, then do what Rex said the first time except don't bother with a common event. Don't do the second one he suggested (the edit) because the player would have to use the item for it to become non-sellable.
So, basically, just make a parallel process event wherever the item can be bought which looks like this:
Conditional Branch: <Buyable item> in inventory
Change Items: <Buyable item> - 1
Change Items: <Sellable item> + 1
Branch END
But like I said, I don't see why you'd go through the trouble of making an item unsellable if you can just buy it again. And yeah, like people have ben saying, items are unsellable if their price is 0. And Falcon, you probably said Key Items because there's a script that rearranges the item screen into compartments, placing all items with price 0 into their own compartment called Key Items. I don't recall which script it was though ;9
That's what I said Modern...
Quote from: Seamus on June 04, 2007, 06:59:12 PM
do what Rex said the first time except don't bother with a common event
I know, I was just telling him not to bother with a common event, since it is not good to have a parallel process running all the time when it only serves a function in a couple maps.
I showed the code to him/her again just to show him which of your explanations I was referring to, as your second one:
Quote from: SirJackRex on May 29, 2007, 08:55:50 PM
EDIT:
Wait, try this:
Common event:
Remove [sell able item]
Add [non sell able item]
wouldn't work, since the player would have to use the item before he could get the unsellable one.
opss! (blush)
Didn't see that!
Ahh, checked it out, and yeah, it doesn't work, hat about switching it over? Like add the non sell able item before then remove the sell able one.
Wait... Has anyone else realized that the guy who started this hasn't replied yet? To tell who was right? Just thought I would mention this...
Parallel Process
Variable = # of item
if variable > 0
remove_item(Item_Buyable,variable)
add_item(Item_UnSellable,variable)
end
:)