TriBool

From Director Online Wiki
Jump to: navigation, search
--/******
--* TRIBOOL
--****
--* @Param  : 'aTriBool' <Integer/Boolean>
--* @Return : ''         <Integer/Boolean>
--* @Note   : -1 = UNDETERMINATE, 0 = FALSE, 1 = TRUE
--*           must be initialized to FALSE
--*           Could be use as a state machine.
--*           (ex: [#STOP, #PAUSE, #PLAY], [#FALL, #WALK, #RUN])
--*           Don't use it like this, as a movie script, it's just a tip
--*           (see 'Boost <TriBool>' for usecase)
--***/
on mTriBool( aTriBool )
  return( (Not(aTriBool) - Not(aTriBool - TRUE)) )
end
--*/