User Tools

Site Tools


logic_scripting

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

logic_scripting [2021/11/11 10:00] – created viclogic_scripting [2021/11/11 10:12] (current) – vic
Line 10: Line 10:
 ===Syntax=== ===Syntax===
 {{:dcx:logic.jpg|}} {{:dcx:logic.jpg|}}
 +
 +You can use ';' semi-colons to seperate lines of instructions. In case of 'IF Logic' all lines must return TRUE for the total script to return TRUE. In case of 'SET Logic' all lines will be executed. 
 +
 +Also note that when using multi-line in 'IF Logic' you can use the initial lines to give some SET Logic instructions. For example: 'TEMP_VAR=dth(1,100); TEMP_VAR>50'. This can help with complex calculations.
  
 ===Variables (aka Flag Instructions)=== ===Variables (aka Flag Instructions)===
Line 16: Line 20:
 You can read a variable in IF Logic like this 'MY_VAR<100' for example. If you are IF checking a variable not yet defined it will have value 0. You can read a variable in IF Logic like this 'MY_VAR<100' for example. If you are IF checking a variable not yet defined it will have value 0.
  
-===Syntax examples===+===Variables hardcoded=== 
 +TURN = Returns 0 for first player, and 1 for second player. 
 + 
 +ROUND = Returns round number 
 + 
 +===Notable CHKs=== 
 + 
 +==Chk(19,TURN) : Is player an AI?== 
 +Returns 0 if human player.  
 + 
 +Returns 1 if AI. 
 + 
 +==Chk(150,TURN) : Difficulty level setting for the AI== 
 +Returns 0 if regular difficulty 
 + 
 +Returns 15 if challenging difficulty 
 + 
 +Returns 25 if hard difficulty 
 + 
 +Returns 40 if very hard difficulty 
 + 
 +Returns 55 if super hard difficulty 
 + 
  
  
logic_scripting.1636624811.txt.gz · Last modified: by vic

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki