Happy Monday!
I was curious if the and/or functions of the Lua conditions can be combined? For instance, in the buttons that I have turning on and off if certain conversations and relationship levels are met, would it be possible to set up a sort of, either or series of conditions?
Example: Conversation #3 is available to a player if conversation 1 had is true, conversation 2 had is true, and the relationship value is over 25. All of this works with the and function in the Lua condition wizard. Would I also be able to add an or condition at the end of that so the player could activate the conversation if some of those conditions are false but a secondary set of conditions is true?
Basically something like
V1 = true and
V2 = true and
V3 = true or
Vsecret = true and
Vothersecret = true
any/all mix in Lua conditions
Re: any/all mix in Lua conditions
Hi,
Yes. The easiest way is to choose one option, such as "All". This will add "and" between all of the conditions:
Then manually change the "and" to "or", and add parentheses to clarify the grouping:
Yes. The easiest way is to choose one option, such as "All". This will add "and" between all of the conditions:
Code: Select all
V1 == true and
V2 == true and
V3 == true and
Vsecret == true and
Vothersecret == true
Code: Select all
(V1 == true and
V2 == true and
V3 == true) or
(Vsecret == true and
Vothersecret == true)
-
- Posts: 95
- Joined: Sun May 03, 2020 2:17 pm
Re: any/all mix in Lua conditions
ahh okay! I thought that might work but I didn't want to put it all together and end up with 7 errors when I try to run it Thank you!
Re: any/all mix in Lua conditions
You're welcome!
BTW, while the format will be the same, your actual Conditions will almost certainly look a bit different in details. Maybe something closer to:
BTW, while the format will be the same, your actual Conditions will almost certainly look a bit different in details. Maybe something closer to:
Code: Select all
(Variable["DidConv1"] == true and
Variable["DidConv2"] == true and
Actor["Ann"].Relationship > 25) or
(Variable["secret"] == true and
Variable["othersecret"] == true)