Comdition issue?

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
hrohibil
Posts: 369
Joined: Thu Nov 04, 2021 12:50 pm

Comdition issue?

Post by hrohibil »

Hey tony

Please see attached image.

If i have the vGetItem then the conversation goes down the chain to the " Excellent, you feed....". And that works meaning if i have the item it does play that.

But if i don't have the item it should play the node to the right "You don't have the chicken" i set a vGetItemCount(id) < 0..
But nothing happens . As if it don't look at my condition.

User avatar
Tony Li
Posts: 22144
Joined: Thu Jul 18, 2013 1:27 pm

Re: Comdition issue?

Post by Tony Li »

Hi,

If you have none of item 29, then vGetItemCount(29) will be 0. So the Conditions should check if the count is less than or equal to zero:

Code: Select all

vGetItemCount(29) <= 0 and (Variable["FeedWolf"] == false)
Technically you can check if vGetItemCount(29) is exactly zero since vGetItemCount() will never return negative numbers:

Code: Select all

vGetItemCount(29) == 0 and (Variable["FeedWolf"] == false)
hrohibil
Posts: 369
Joined: Thu Nov 04, 2021 12:50 pm

Re: Comdition issue?

Post by hrohibil »

Makes perfectly sense.
Thank you Tony
User avatar
Tony Li
Posts: 22144
Joined: Thu Jul 18, 2013 1:27 pm

Re: Comdition issue?

Post by Tony Li »

Happy to help!
Post Reply