Notifications
Clear all

[Closed] How can a boolean be converted into a 0 or 1?

Hello guys.

I am a rigger for Maya but i recently switched to 3ds max.

Here’s my problem, I want to activate/deactivate movement that has been automated with a float script. My thought was that i could just use a boolean button in the attribute holder and multiply the script by the boolean like in Maya. When i clicked evaluate it said that false is incompatible. Is there a way to convert a boolean to a number? Int or float i don’t care. Or is there a better way to do this?

Thank you

3 Replies

boolval as integer

should work

also:

int boolvalue

but it’s only for versions 2018+ (or maybe 2020+… I don’t remember)

for older versions:

a = if boolvalue then 1 else 0

Thank you. I’ll try that.