How do I set down a picked up item?

Hey there,

Hopefully the title isn't too confusing.

I'm really new to RPG Maker and I have a small game I want to make. Something I can finish.

With some research into Self Switches I've figured out how to make a sprite change or disappear, indicating you've picked it up.

But I haven't been able to figure out how to set it down again with events.

Is it possible to make it so you can set down the item anywhere? If not I can make a place for things to be set.

Btw I realize you aren't actually picking up the thing that disappears. I just wasn't sure how else to phrase the title.

Thanks!
If you want to designate a specific place where it can be set down, just use more events and self switches.


If you want to be able to set it down ANYWHERE, I think there is a script by Tsukihime that will let you do that. I don't recall the name, but you could look through the Master Script List sorted by author.
If you want to designate a specific place where it can be set down, just use more events and self switches.

If you want to be able to set it down ANYWHERE, I think there is a script by Tsukihime that will let you do that. I don't recall the name, but you could look through the Master Script List sorted by author.
Oh wow, that ended up being absurdly simple once I took a break from trying to figure it out. It was more self switches. Thanks!

This might be into scripting areas, but is there any way you can record how many of an item you've picked up and what state it's in?

To add some context, I have my character in a room and part of the puzzle will be interacting with and moving boxes. So they will either be open or closed, and are able to be picked up and moved in either state.
If you can only pick up one at a time, that could be done with more switches.
Oh wow, that ended up being absurdly simple once I took a break from trying to figure it out. It was more self switches. Thanks!


This might be into scripting areas, but is there any way you can record how many of an item you've picked up and what state it's in?


To add some context, I have my character in a room and part of the puzzle will be interacting with and moving boxes. So they will either be open or closed, and are able to be picked up and moved in either state.
Switches and variables! See the variables guide on how to count the amount of a certain item the player has. Use self switches to determine the open/closed state (simply have two event pages, one with an open graphic and one with a closed one).
Switches and variables! See the variables guide on how to count the amount of a certain item the player has. Use self switches to determine the open/closed state (simply have two event pages, one with an open graphic and one with a closed one).
The variables guide helped me a lot. I have a feeling I'm going to continue referencing it for a while. Thank you.

I decided to simplify it to only the open state. 

But I want people to be able to place and pick up the items pretty much anywhere within an area. My problem now is that once I set the item down, then pick it back up, I can't set it down again in the same place or anywhere else that I've designated as a place to put something. 

I've been messing with it for a while and I just can't work it out.
Show us your events - include the whole window, and if they have multiple pages, show us all of the pages.


Also, have you tested what happens when you put the item down somewhere then leave the map and return? Is the item still there? Is it the same item? What about if you save your game and close it down, then reload it?
Being able to put it anywhere is just really not what RPG Maker was made for, you'd need a script, or some more advanced eventing. If there is a limit to how many you can put down (and if it's only restricted to one map), then you can simply use coordinates in combination with 'set event location', and you'd need another event that checks for button input (so you can 'put' down the events, as it is). But this is more advanced, I wouldn't recommend it for a beginner like you.
Perhaps the problem becomes better understandable with a bit of technical background information:


There are no items that can be placed on the map, you can only place events pretending to be items (or events pretending to be NPCs for that point).


If there is no event at a position, then you can't have something there - that is why for dropping an item you have to place an event there.


However, you can't create events without scripts - so it'll be either a pre-created event on that specific position (for example, if you can only place items on the tables in a room, you can prepare an event on each of those table positions), or an event that was made out of sight of the player and is relocated to where the item will be dropped.


The second problem is to make the event into different items with different sprites. There are several ways to do this, but if you have bugs in your version we need to see what you have done so far, please screenshot all event pages.
Show us your events - include the whole window, and if they have multiple pages, show us all of the pages.

Also, have you tested what happens when you put the item down somewhere then leave the map and return? Is the item still there? Is it the same item? What about if you save your game and close it down, then reload it?
I hadn't even thought of doing those things. I was still working on only the first map, to make sure I understand how everything works.

But after testing it, the item is still there and it's the same item on changing room and saving and re-opening game.

Closed Box Event - Should only be opening box, then able to pick up open box and add one to the player's inventory

Spoiler
Screenshot (4).png

Screenshot (5).png

Screenshot (6).png

Open Box Event - Should only be able to pick up, and add one to the player's inventory

Spoiler
Screenshot (7).png

Screenshot (8).png

Set Event - My goal is to be able to put down, and pick up the item set here as many times as you want. Should be subtracting item on drop, and adding one on pickup.

The first image, with the conditional branch, was my attempt at figuring out how to check the players inventory for the item needed to drop.

Spoiler
Screenshot (9).png

Screenshot (10).png

Screenshot (11).png
Hopefully these aren't put together TOO badly. I'm still learning how these things work.
Set Event - My goal is to be able to put down, and pick up the item set here as many times as you want. Should be subtracting item on drop, and adding one on pickup.


The first image, with the conditional branch, was my attempt at figuring out how to check the players inventory for the item needed to drop.
Delete the third page
On the second page, remove the control self-switch B = ON and add a control self-switch A=OFF at the same place.


You need to return to the first page as the "empty place", not create a new page for that...
Delete the third page

On the second page, remove the control self-switch B = ON and add a control self-switch A=OFF at the same place.

You need to return to the first page as the "empty place", not create a new page for that...
Of course it would be something that simple.

So...basically I'm referencing the first event page by turning the self-switch off?

I guess I don't fully understand the self switches yet
No - what you're missing here is how multiple pages work, with page priority and condition.


Only one page of an event can be "active". To be active, all conditions on that page have to be fulfilled (if there are no conditions, that is automatically true.


If several pages have their conditions fulfilled, the one with the highest page number will be active.


When you control the self-switch OFF, the conditions for the second page are no longer fulfilled, and the first page becomes active again.
No - what you're missing here is how multiple pages work, with page priority and condition.

Only one page of an event can be "active". To be active, all conditions on that page have to be fulfilled (if there are no conditions, that is automatically true.

If several pages have their conditions fulfilled, the one with the highest page number will be active.

When you control the self-switch OFF, the conditions for the second page are no longer fulfilled, and the first page becomes active again.
Okay that makes much more sense. Thank you. I didn't realize that's how event pages worked. 

Original thread: https://forums.rpgmakerweb.com/threads/how-do-i-set-down-a-picked-up-item.44302/