
Board: Tips, Tricks, Tutorials
I want to set ONLY the FIRST bit from 1 to 0, how do you do that in MUGEN?
'~' operator seems not working

Posted: January 18, 2021, 07:31:54 AM
Sorry, some sad workaround discovered is Var(n) & 2147483646) but this is horrible...
Wonder if anyone can share a better solution? Or this is the ONLY solution in MUGEN?
Posted: January 18, 2021, 07:35:59 AM
The end result is unstable...
(Var(n) := Cond((Random % 2), (Var(n) | 2**0), Var(n) & 2147483646))
Sometimes it will be 1 even if Random % 2 returns 0... really need help on what is going on ?
Posted: January 18, 2021, 07:47:36 AM
Can someone help me if what would be a good BIT FLAG expression replacement in a Null SCTRL on below VarSet SCTRL ?
[State 10001, Var(1)Set]
type = VarSet
trigger1 = (Time = 0)
v = 1
value = Random % 2
ignorehitpause = 1
persistent = 0