Easy way to stop an object being dropped in certain locations?

Is there an easy way to block all objects being dropped in certain locations only? Items would be dropped as usual in all the other locations.

In my game I have a maze in a swamp and I want to tell the player that if they drop an object it will sink into the swamp and be lost so they can't do it.

Any help would be appreciated, thanks

Simon


run a script that returns/moves the item back to their inventory when they drop it - if they are in that location (if player in room 'swamp'), and display message "you can't drop that here it will be lost" ? That would be my first attempt..might not work.


It might be a lot of work, but you could set all the items to drop=False via the item's attributes when they enter that specific location, and then set them all back to true drop=True once they exit that location.

Personally, I would create a Function to make it easier in case you had to do this again, and then just call the Function when the situation occurs. That way if you have to add objects to it later, it'll be super easy. Otherwise, you'll have to go back through every single spot you can't drop items and add in all the new items that might apply now.

Anonynn.


Thanks for the replies, I will try those suggestions.


Can't you just create a command for that room/those rooms that handle "drop [any object]"?

I think it is something like...

  1. Add a command for that room you don't want things to be dropped in.
  2. In the box just below command pattern, type this: drop #object#
  3. Add a 'print message script' and print whatever message you want. I put in:
    The room you are in is a nasty, mucky swamp, so...
    You should not drop anything here as it will be lost forever!
  4. I know that is a bit of a generic message, but there is a way to recall that specific object using the same method, but I am not 100% sure how to do it.

Good luck!


Yes that works, I had not noticed the commands on the scripts tab, I had focussed on the VERB tab of the objects..

Thanks for your help

Simon


Here is an alternative:
https://github.com/ThePix/quest/wiki/More-Options-For-DROP


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums