Hiding visible items in containers in inventory

Is there any way to edit what the inventory shows and what it doesn't. Can items inside containers be listed when looked at, instead of showing up in inventory?


I have not tried it yet, but you can take a look at this link

[Checkbox] Hide children until it is looked at

https://docs.textadventures.co.uk/quest/tutorial/using_containers.html


I don't know why, looking back at that, I was not more clear. I had meant for that to say, is there any way to hide things in containers long term. Whenever you look at some container, the items inside become visible, but they also stay visible which is a nuisance if you have a lot of same items.


Okay, I just tried and it is indeed strange.
After clicking the checkbox of "Hide children until it is looked at" and/or "List children when object is looked at or opened."

  1. The player can look at candybox and find "It contains a blue candy and a lollipop."
  2. But, when candybox is inside inventory, the candybox's look at suddenly becomes disabled???
  3. After clicking once look at which is working, the second, third and future times of look at suddenly stops working.

So I went into the first tab of candybox "Setup",
At description, look at: Run script
And I typed in the following code which solves the issues listed.

candybox.listchildren = true

Basically containers have the open and close verb, when you click close, the children disappears temporarily, or is there a reason why you are avoiding using the automatically created close verb?


However even the above code does not seems perfect, when the container is not opened, the player still cannot see the children. The player needs to open the container first before he can sees the children.

So you can try the following code or modify it.

candybox.isopen = true
candybox.hidechildren = false
candybox.listchildren = true

So perhaps, there is a reason you do not want to use the close verb,
then you can try the following code or modify it:

candybox.isopen = true
candybox.hidechildren = false
candybox.listchildren = true
SetTimeout (3) {
  candybox.isopen = false
  candybox.hidechildren = true
  candybox.listchildren = false
}

And surprisingly, after using the above final code,
You can now uncheck the container checkbox, meaning candybox is not a container,
but yet, it still list the children when look at.


Thank you for being so persistent I had to realize I hadn't tried that. I just didn't want a lot o GB extra verbs, but I think I was misjudgimg their usefulness after all.
Thanks again. It's helped me.


Log in to post a reply.

Support

Forums