Difference between revisions of "Category:Conditions"
Jump to navigation
Jump to search
a further refinement of Complex Conditions discussion
imported>Egocarib |
imported>Egocarib (a further refinement of Complex Conditions discussion) |
||
Line 90: | Line 90: | ||
If we properly distribute these conditions using the formula above, the first '''OR'''-block that checks for ('''''A''''' OR '''''C''''' OR '''''E''''') will, in our case, be a check for ((Global == 1) OR (Global == 2) OR (Global == 3)). If these are the only three valid settings for our global variable, we know that this block of statements will ''always be true'', so we can simply eliminate it from our conditions list to shorten things up. Furthermore, the | If we properly distribute these conditions using the formula above, the first '''OR'''-block that checks for ('''''A''''' OR '''''C''''' OR '''''E''''') will, in our case, be a check for ((Global == 1) OR (Global == 2) OR (Global == 3)). If these are the only three valid settings for our global variable, we know that this block of statements will ''always be true'', so we can simply eliminate it from our conditions list to shorten things up. Furthermore, any triplet of ORs above that includes condition F (Health <= 100%) will also always be true, because the actor's health will always be at 100% or less, so we can eliminate several more sets of conditions as a result, leaving us with: | ||
'''''A''''' OR '''''D''''' OR '''''E''''' AND '''''B''''' OR '''''C''''' OR '''''E''''' AND '''''B''''' OR '''''D''''' OR '''''E''''' | |||
Thus, by taking these steps we would have cut our condition list down from 30 conditions to only 9! | |||