Evil Newspaper

Enpherdaen
23 Nov 2016, 17:43I'm trying to script my game so when you pick up this one newspaper for the first time, it delivers a text and gets added to your inventory. But if you drop it and pick it up again it just says "taken". I've gotten it for the most part but when I type in the command to pick up the newspaper while I'm in another room, it still get's added to my inventory and shows the text for the first time you pick it up - even though I set it so the object has to be in reach to pick up. It's becoming a big mess and hurting my poor fragile brain so I'm slowly becoming more stupid because of it.

Father
23 Nov 2016, 18:38Possibly, you have set inventory to run a script and made that script 'first time' , (message and take object, ) and not put take object in the 'else' option. This would mean that you never dropped it .

Enpherdaen
23 Nov 2016, 19:03I'm confuzzeled.
The Pixie
23 Nov 2016, 19:08In the "take" script, after giving the message, and moving the item to the inventory, have it set the "take" attribute of the newspaper to null.
this.take = null
This will delete the script, so the next time it will just do the default action for taking.

Enpherdaen
23 Nov 2016, 19:20Never mind I found an extremely simple way to do it haha. Thanks matey.
hegemonkhan
24 Nov 2016, 06:05there's also:
http://docs.textadventures.co.uk/quest/scripts/firsttime.html
though, you'd have to implement this into the default 'take' Verb/Command
Does over-writing/riding 'take', wipe out all of it's built-in functionality or just its local scripting?