The setConditionSuccess native AI script function sets a static boolean flag that the dynamic_if action type reads to determine which sub-action to execute.
This function is an internal mechanism used by
dynamic_if. You do not need to call it directly — thedynamic_ifaction automatically wraps your expression in code that callssetConditionSuccess. It is documented here for completeness.
()setConditionSuccess(value: f)
The dynamic_if action type wraps your expression into AI script code like this:
if (<your_expression>) { ()setConditionSuccess(1); } else { ()setConditionSuccess(0); }
This code is compiled and executed at runtime. The setConditionSuccess call sets a static global boolean (CAILogicDynamicIfHelper::_ConditionSuccess), which the dynamic_if action reads immediately after execution to decide which sub-action to run.
The flag is reset to false before each dynamic_if evaluation, so stale values from previous calls don't affect the result.
Source: ryzom/server/src/ai_service/nf_grp.cpp (setConditionSuccess_f_), ryzom/server/src/ai_service/ai_logic_action.h (CAILogicDynamicIfHelper)