ImageExists

Family: Image · One form

What it does

ImageExists answers a question: whether an Image object still exists. It takes iImageIndex (an integer), and answers an integer. iImageIndex is the id of an Image object, the one LoadImage returned: it is how the call knows what to act on.

Syntax

ImageExists(iImageIndex integer) → integer

Parameters

NameType
iImageIndexinteger

Every form returns

integer

Example · generated

image = LoadImage("assets/sprite.png", 1)DO  Print(ImageExists(image))  Sync()LOOP

LoadImage is there to give the call something to act on; ImageExists is the line that matters. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.

35 commands in Image