Clonk Developer Mode Documentation
Introduction
Contents
Search
Engine
Command Line
Game Data
Script
if
Category:
Script
Since engine version:
4.6.5.0 CP
Description
If fCondition is non-zero the directly following command or script block will be executed.
Syntax
void
if (
bool
fCondition);
Parameter
fCondition:
Condition
Example
if
(!
FindObject
())
CreateObject
(ROCK);
Creates a rock if no other objects are present.
if
(!
FindObject
()) {
CreateObject
(ROCK);
CreateObject
(GOLD); }
Creates a rock and a chunk of gold if no other objects are present.
See also:
C4Script
,
Operators
,
while
jwk, April 2002
Clonk Developer Mode Documentation
Introduction
Contents
Search
Engine
Command Line
Game Data
Script