I have a config.txt file for my character, and inside it there's only one helper with a few vars.The problem here is (and I know it sounds dumb but honestly I don't remember ever having this issue before): looks like I can't set more than 3 vars at the same time!Here's the code:Code: [State 1210, VarSet]type = null;triggerall = !Timetrigger1 = var(0) := 1trigger1 = var(1) := 0 trigger1 = var(2) := 0 trigger1 = var(3) := 1 trigger1 = var(4) := 1 ignorehitpause = 1Vars 0, 1 and 2 work like a charm, but vars 3 and 4 don't!How can I solve that?
Try changing that code to this:Code: [State 1210, VarSet]type = null;triggerall = !Timetrigger1 = var(0) := 1 || 1trigger1 = var(1) := 0 || 1trigger1 = var(2) := 0 || 1trigger1 = var(3) := 1 || 1trigger1 = var(4) := 1 || 1ignorehitpause = 1See if that helps. If not, perhaps Var(3) and Var(4) are being changed by something else.
It did help! thanks man!I didn't really get why tho. Could you elaborate a little bit?K-Fox said, December 27, 2021, 06:39:43 pmTry changing that code to this:Code: [State 1210, VarSet]type = null;triggerall = !Timetrigger1 = var(0) := 1 || 1trigger1 = var(1) := 0 || 1trigger1 = var(2) := 0 || 1trigger1 = var(3) := 1 || 1trigger1 = var(4) := 1 || 1ignorehitpause = 1See if that helps. If not, perhaps Var(3) and Var(4) are being changed by something else.
If I'm right, when using ':=", if the value to the right is 0, the remaining triggers don't get checked because a trigger returned false (0).Lets look at your previous code:Code: [State 1210, VarSet]type = null;triggerall = !Timetrigger1 = var(0) := 1trigger1 = var(1) := 0 trigger1 = var(2) := 0 trigger1 = var(3) := 1 trigger1 = var(4) := 1 ignorehitpause = 1The first one for Var(0) works because the value to the right is not 0, so Var(0) gets set to 1 as normal.But for the next trigger, the right value is 0, which returns 'false', which means that trigger (and the ":=") is ignored, and so are the rest of the triggers.That is why Var(3) and Var(4) weren't being set; the triggers were being skipped. It technically wasn't working for Var(1) and Var(2) because of that, but since the default value for all variables is 0, it seemed that it was.Adding "|| 1" to the triggers allows those triggers to work even if the value the variable is to be set to is 0, since || means "if either x or y is is non-zero, return true", so while Var(2) and Var(3) have the value that normally causes the skip effect, the "|| 1" causes a 'true' value to be returned, so those variables are 'set', and the remaining triggers are checked as normal.I hope that was easy to understand. I'm terrible at explaining things.