Get LazyMouse status

This is a relatively simple idea, but I’m still having problems with ZBrush syntax.
For those with a colourful imagination consider not so much a learning curve, but I feel like a little bee trying to headbutt his way through the glass gates to the wonderful castle of ZScript. You know, before the battering ram arrives.

Right, simple premise. On button click:

  • find out LazyMouse status
  • change LazyMouse status
  • report LazyMouse status as either “off” or “on”
  • scrap that last line for either on/off image

Here’s what I have so far:

// ZSCRIPT 4.73
[IButton, “Lazy Mouse”, “Get Lazy Mouse Status”,


[VarDef, s, “”]
[VarDef, lmBool, False]

// define stuff
// get LazyMouse status ?? No idead how to do that
// set lmBool to LazyMouse status
// s = (lmBool == True) ? “on” : “off”
// if only ZScript had ternary operators!
// Set a note
[VarSet, s, [StrMerge, "Lazy Mouse: ", s]]
[Note, s,1]
// set image - let’s try that later, shall we?

]// End of ZScript

Just going out on a limb here, but does ZScript have ternary operators??

You can query the state of a switch by using IGet:

[If,[IGet,Stroke:Lazy Mouse],
[Note,[StrMerge, "Lazy Mouse: ", lazyState]]

ZScript doesn’t have ternary operators. You have to use [If] instead. And variables can only be declared as strings or floats/integers, not bool. But you can use 1/0 instead of true/false, as I’ve done above.


As always Marcus, thank you.