Checkvar¶
Compare a flagvar against a value or another flagvar for a condition and redirect if this condition ends up being true or do nothing if it ends up being false.
Syntax¶
(1)
|checkvar,flagvar,value,lineidtrue|
(2)
|checkvar,atleast,flagvar,varvalue,lineidtrue|
(3)
|checkvar,moreand,flagvar,varvalue,lineidtrue|
Parameters¶
flagvar
: int¶
The flagvar slot to check. This must be a valid flagvar slot or an exception will be thrown.
atleast
| moreand
¶
This value determines which syntax to use. Any other value will be interpreted as flagvar
and the command will operate in syntax (1).
- no value: redirect only if
flagvar
is equal tovalue
atleast
: redirect only ifflagvar
\<varvalue
moreand
: redirect only ifflagvar
>=varvalue
value
: int¶
The value to compare the flagvar against. This must be a valid integer or an exception will be thrown.
varvalue
: int | var
int¶
The value to compare the flagvar against or the second flagvar slot to compare the first one against.
The value form must be a valid integer or an exception will be thrown.
The flagvar slot form must ONLY contain the text var
with the flagvar slot next or before it. Any other non numerical text will be interpreted as the value form which will throw an exception. The integer part must be a valid flagvar slot or an exception will be thrown.
lineidtrue
: int¶
The Dialogue line id to redirect to if the overall condition gets evaluated to true. If the condition gets evaluated to false, this parameter is ignored.
Remarks¶
It is not possible to use syntax (1) with a flagvar as the second operand of the condition. To do so, you can use checktrue or checkflag
If the applicable condition is false, this command will do nothing and processing resumes as normal.
If the applicable condition is true however, the input string will be overwritten to an OrganiseLines version of the dialogue line id lineidfalse
prepended with a parameterless blank command. This will reset the character position of the Char loop to restart at the beginning of the input string which will cause processing to resume at the start of the new input string. This will also disable skiptext
if it was enabled by the Text advance system.