Background for Skyrim SE
Member of the clib script
ActorfunctioncTernaryActor(boolifThis, ActorreturnThis, ActorelseThis=NONE)Global

Description

Documentation String

Requirements: None

Documentation Comment

========================= Conditional statements
NOTE: These functions can't short circuit like a traditional ternary. Thus, they're most efficient if only
one argument is a function. If both are functions they both will be run before returning a value;
Nesting these functions is perfectly fine with numbers or operator calculations but know this: nesting
with multiple functions as arguments will results in allllll of the function being called. Use of
traditional if/then is recommended in those cases. Nexting ternary functions inside if thens works
great though (and will still shave lines off)

Single value returns


Parameters

  1. boolifThis

  2. ActorreturnThis

  3. ActorelseThis=NONE


Examples

Auto-Generated Example

bool myBool__ifThis
Actor myActor__returnThis
Actor myActor__elseThis

Actor returnedValue = clib.cTernaryActor(myBool__ifThis, myActor__returnThis, myActor__elseThis)
Some data provided by the Skyrim Creation Kit Wiki. Licensed under the Creative Commons Attribution-ShareAlike license.