MZ ARPG Plug in Dropped items won't disappear b/w maps

Hello everyone!

I know you all love questions about the free ARPG plug in but I have an interesting one here (that's probably simple and I just don't see it).

I have the plug in working and I wanted to make it so when an enemy is killed, they drop an item which is then displayed on the ground at the location they died at. When the player runs over the item, the item is picked up, and then the image on the ground disappears, a message of "you received x" displayed and the item added to the inventory. This all works as intended (I'll show the pages in a second).

However, I have a few issues.

If I leave the map and come back, the item image stays but is no longer at the position at which it was dropped but at the position in which the enemy originally spawned. Said enemy *won't* respawn unless I then go pick up the item.


I have the appropriate commands in place that *should* be respawning the enemies but this doesn't work unless the item is picked up. If other enemies are on the map, they continue functioning normally.

So what I would actually like to happen is either: the item(s) on the ground which aren't picked up before the player leaves the map disappear and the enemies would then respawn normally when the player re-enters the map or enemies which have dropped items *don't* respawn, but the item stays at the location in which they died. Images below!

1716002490567.png
1716002516104.png

These are the two pages associated with the drop
1716002639824.png

And here's the page associated with resetting (this is on an event that would transfer the player out of an area)
1716002750606.png

And here's the event I'm using to spawn an enemy on map.

1716002927585.png

Here's the enemies running around the room

1716002982982.png

Here's one of the enemies dead, with the dropped item on the ground where they died.

1716003022868.png

And here's the same dropped item, reverted to the starting position of the original enemy event. The item is still interactable and will still give me a dropped item. Once this item is picked up, item disappears until I enter and re-enter the map at which time the enemy will respawn as normal.

Some notes:
- On the enemy event the loop portion and drop item switches weren't there earlier today, I just added them to see if it would fix my issue before posting but they don't seem to do anything.

- On the Transfer Event, the Drop Item switch was also not there earlier but adding it also didn't seem to fix my issue.

- Before adding the above two notes, all events were working the same as described above so the changes didn't seemingly alter anything.

Sorry for the long post but I figured as much info as possible would help! Thank you!
Don't you need to put some symbol (is it the dollar symbol?) before the switch name to turn it into a self switch? Right now your item drop switch seems global? Turn the item drop switch into a self switch and then the 'extended self switch clear' should work on it.
Oh my god that worked. You are awesome, thank you!

It did create a different problem though; I can see the enemy respawn as the transfer is happening. (The self switch clear happens as I leave an area). Would putting the self switch clear (tied to the map ID) As an autorun/parallel on the next map be better do you think?

Ex:

Map 1: Enemies here; Kill enemy, item dropped.
- Player leaves Map 1, enters map 2


Map 2: Upon entry, initiate autorun/parallel self switch clear for room Map 1

Or do you think there's a better way to accomplish this?
Cool, yeah you can respawn the enemies at the entry points from other maps, not leaving points. Or use a fadeout screen before the self-switch clear.
Awesome I'll try those and see which flows better, ty again!


One last question; I tried googling this but can't really find an answer.

What do !, $ and % mean in regard to variables, switches and images?

I know now, thank to you :], that % in front of a switch sets it to a self switch but not sure what the others mean. I think $ or ! has something to do w/ animation but that might only be for images.
The help sections are in the plugin files. $ self variable, % common event variable, # decimal variable. Probably similar login in switches. The plugin maker's descriptions aren't always the best though.
Yeah I read the help file, I was just curious if it was a JS thing or a tag specific to RMMZ.

Some of the things that are associated with the ARPG plug in have them, but some of the base RMMZ files also have tags like that.


Specific to the ARPG thing, there's a %Common Distance variable which calculates distance for collision and detection, which is a common event, but I guess I was curious how variables like that worked since it appears to give a value to an individual event despite being a singular variable as if it's spawning multiple instances of the same variable that are just relevant to the script/event calling for/assigning them.

Thank you again for your help, it's greatly appreciated.

Original thread: https://forums.rpgmakerweb.com/threads/arpg-plug-in-dropped-items-wont-disappear-b-w-maps.168787/