or
Purpose
Specifies alternate condition
Description
The resulting condition is true if one of the conditions are true
Syntax
if condition1 or condition2 then ... endIf // ... is executed either condition is true
Arguments
condition1 first condition
condition2 second condtion
Example
image = loadImage( "Untied Games/Enemy small top C", false )
ship = createSprite()
setSpriteImage( ship, image )
lastpos = { gWidth() / 2, gHeight() / 2 }
setSpriteLocation( ship, lastpos )
setSpriteScale( ship, { 20, 20 } )
rv = -0.5
gv = 0.5
bv = 0
loop
clear()
sc = getSpriteColour( ship )
if sc.r > 1 or sc.r < 0 then
rv = -rv
endIf
if sc.b > 1 or sc.b < 0 then
gv = -gv
endIf
setSpriteColourSpeed( ship, { rv, gv, bv, 0 } )
updateSprites()
drawSprites()
update()
repeat
Associated Commands