how to use 'HasAllItem' in verse for conditional button

Hello, I’m really new to verse and coding in general.
Today, I tried to use HasAllItem from conditional button, so that it can check if the player has the required item that is stored in the conditional button.


But, I do not know how to use it… Whenever I try to check if the player has the key (the required material I put in conditional button), I get red squiggles.


I would really appreciate it if somebody could help me!

1 Like

Hello. I see two fixes that you could make to correct your issue.
The first thing you need to do is a minor change to line 30:

detect_weapons(Agent: ?agent) : void =

The second issue is on line 31, where you you spell Subcibe, instead of Subscribe.

I hope that resolves your issue.

1 Like

thank you sm I appreciate it

sorry to trouble you again but even after I corrected the ‘subscribe’ spelling error, I still got red squiggles T-T.
image

Hello again. I can see now, that you tried to use “Subscribe” incorrectly here. From my understanding, you are only allowed to use Subscribe on listenable events.

Below is a screenshot of events associated with he capture_area_device. Notice that they all end with **Event

Now back to your original question; Here is how you actually handle the logic for for your needs.

1 Like

Omg, thank you! that worked. That really helped me out a lot and I really appreciate you for taking the time to help me out. Thanks.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.