Difference between revisions of "Conditions and Values"

From The Official Visionaire Studio: Adventure Game Engine Wiki
Line 1: Line 1:
 
<strong>Conditions & Values</strong> are a fundamental necessity when it comes to game development, as they are used to control what events have taken place or have yet to take place; from actions, dialog choices, to puzzles & so forth.
 
<strong>Conditions & Values</strong> are a fundamental necessity when it comes to game development, as they are used to control what events have taken place or have yet to take place; from actions, dialog choices, to puzzles & so forth.
  
<strong>Conditions</strong>: only have two options of a Boolean nature, which are: <span class="green bold">true</span> or <span class="red bold">false</span>. Conditions are the simplest form of determining if an event has already been performed or is still waiting to be performed. They can also be used in <span class="green bold italic">if</span> queries to determine if some other necessary event has been performed before some other event can be performed; such as the character has not yet located an object or flipped a switch etc...
+
<strong>Conditions</strong>: only have two options of a Boolean nature, which are: <span class="green bold">true</span> or <span class="red bold">false</span>. Conditions are the simplest form of determining if an event has passed or has yet to come to pass. Conditions unlike values serve 2 purposes in Visionaire Studio: they can be used in if else queries & they can also be directly linked inside of an objects, dialogs or interface buttons properties tab to determine if the aforementioned object, dialog choice or interface button should be active (shown) or disabled (hidden). If disabled then the any images or animations linked to the object will be hidden & all actions associated with the object will also be unavailable.
  
Conditions also serve as another purpose for Visionaire Studio itself, as we can link conditions directly to objects, interface buttons & dialog choices via their properties tab which determines if the aforementioned thing is active or inactive. If the object, button or dialog choice is inactive then it will be hidden & none of the assigned action parts listed for the object will be available until the object is activated.
+
<div class="toccolours mw-collapsible mw-collapsed tbl-ds">
 +
<span class="bold">Additional Info</span>
 +
<div class="mw-collapsible-content">
 +
<div>
 +
Combined conditions can be useful, but I find Values are a lot more flexible when it comes to multiple conditions needing to met for certain events to be performed. The in editor if query system is not as flexible as writing if queries with Lua mind as there is no method for creating the "and" or "or" operators. Also there is no "elseif" which means that for each <span class="green">if</span> you create that there should also be the same amount of <span class="red">end if</span>.
 +
</div>
 +
</div></div>
 +
 
 +
You can create 2 types of conditions:
 +
1. Variable: this is a single condition which contains a boolean value of true or false.
 +
2. Combined: this allows you to link 2 single conditions & set "and", "or" query to link to an object.
  
 
<gallery widths=70px heights=70px perrow=2>
 
<gallery widths=70px heights=70px perrow=2>

Revision as of 15:20, 26 August 2013

Conditions & Values are a fundamental necessity when it comes to game development, as they are used to control what events have taken place or have yet to take place; from actions, dialog choices, to puzzles & so forth.

Conditions: only have two options of a Boolean nature, which are: true or false. Conditions are the simplest form of determining if an event has passed or has yet to come to pass. Conditions unlike values serve 2 purposes in Visionaire Studio: they can be used in if else queries & they can also be directly linked inside of an objects, dialogs or interface buttons properties tab to determine if the aforementioned object, dialog choice or interface button should be active (shown) or disabled (hidden). If disabled then the any images or animations linked to the object will be hidden & all actions associated with the object will also be unavailable.

Additional Info

Combined conditions can be useful, but I find Values are a lot more flexible when it comes to multiple conditions needing to met for certain events to be performed. The in editor if query system is not as flexible as writing if queries with Lua mind as there is no method for creating the "and" or "or" operators. Also there is no "elseif" which means that for each if you create that there should also be the same amount of end if.

You can create 2 types of conditions: 1. Variable: this is a single condition which contains a boolean value of true or false. 2. Combined: this allows you to link 2 single conditions & set "and", "or" query to link to an object.