If I remove the one of the !user.isStateAffected it works but for only that state, what am I doing wrong?
One thing that isn't harmful but is a little wrong because it's unnecessary is the extra parentheses. It's a good habit to only include things like parentheses and braces where you actually need them so that your eyes learn to see what they're grouping.
The other thing that looks wrong based on your description is the operator you're using. If I understand you correctly, this is the original skill that you want to disappear if
either of the states is on the actor.
You're using the ! NOT operator, which means you're saying "Show this skill if the actor does not have
one of these two states".
Since you also said the states are mutually exclusive, it will
always be true that the actor doesn't have one of them.
It sounds like what you actually want to be checking is if the actor
does have one of them, then saying NOT that. So this actually goes really well with what I said above,
vis-a-vis the correct use of parentheses
:wink:
Code:visible=!(user.isStateAffected(x) || user.isStateAffected(y));
You could also keep the NOT operators as you originally had them and reverse the middle operator:
Code:visible=!user.isStateAffected(x) && !user.isStateAffected(y);
e.g. "Show this skill if the actor does
not have
both of these states"