Jump to content

How do I drop an item at the player's current location?


Recommended Posts

The player picks up Tool_A at Zone_A but has to drop it later in the game in order to pick up a different tool.

I want Tool_A to stay where the player leaves it so it is visible in the locations list and it can be picked up again it necessary.


My first attempt was to move Zone_A to the player's location and place Tool_A back in it but this didn't work. The zone moved OK but Tool_A returned to its original location. Any ideas?


I'm using the Groundspeak builder





Link to comment

Do you have moved the item to the zone? It should work this way, because each item, which is MoveTo() transfered gets the coords of the object it is moved to.


You could although create a hidden zone, which shows items always and move the item there.


I often restrict the drop command to places, where the player is inside a zone. So it is possible to find the item later in this zone.

Link to comment

OK, here's a simple test cartridge. A zone called 'ladder' and an item called 'ladder'.

The item is inside the zone. I pick up the item and the zone disappears. The ladder is in the inventory.

I then move slightly and drop the ladder. The zone has moved and is visible but the emulator thinks the zone is still in the original location and there's no sign of the item anywhere!



Link to comment

Fixing the typo fixed it for me.


I imported the lua file into urwigo, fixed the typo, and rebuilt the gwc file. When I run the cartridge in the emulator (in the Wherigo builder) it worked as you described it should work. I pick up the ladder and the zone disappears and the ladder is in my inventory. I drop the ladder and the zone reappears at the drop location with the ladder in it, ready to be picked up again.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...