CheckCond (CMS)
From The Official Visionaire Studio: Adventure Game Engine Wiki
| Name | Type | By |
|---|---|---|
| checkCond("cond") | Definition | AFRLme |
This small function allows you to quickly return the boolean value of a condition; should only be used with if queries.
Instructions
1. Add the main script to the Visionaire Studio Script Editor & set the script as a definition script.
2a. To check if condition returns true, do something like this...
if checkCond("condition_name") then
-- add some actions here...
end2b. To check if condition returns false, do something like this...
if not checkCond("condition_name") then
-- add some actions here...
endMain Script
function checkCond(cond)
return getObject("Conditions[" .. cond .. "]"):getBool(VConditionValue)
endSyntax Breakdown
| Name | Type | Description |
|---|---|---|
| cond | "string" | This should be a "string" value containing the name of the condition you want to check the boolean value of. |