equals
Purpose
Equals operator ==
Description
This is true if the value of first expression is equal to the value of the second
Syntax
result = expression1 == expression2
Arguments
result true if value of expression1 is equal to the value of expression2
expression1 first expression
expression2 second expression
Example
image = loadImage( "Untied Games/Enemy A", false )
enemy = []
for i = 0 to 4 loop
enemy[i] = createSprite()
setSpriteImage( enemy[i], image )
setSpriteAnimation( enemy[i], image, 0, 4, 20 )
setSpriteLocation( enemy[i], { ( i % 2 ) * 400 + 400, int( i / 2 ) * 300 + 200 } )
setSpriteScale( enemy[i], { 4, 4 } )
repeat
camera = getSpriteCamera()
rotation = getSpriteCameraRotation()
loop
clear()
c = controls( 0 )
printAt( 0, 0, "Camera posotion: x = ", camera.x, " y = ", camera.y, " z = ", camera.z, " rotation: ", rotation )
printAt( 0, 1, "Use left joypad to pan, right joystick to zoom/rotate" )
if c.up then
camera.y -= 5
endIf
if c.down then
camera.y += 5
endIf
if c.left then
camera.x -= 5
endIf
if c.right then
camera.x += 5
endIf
if c.x then
camera.z += 0.05
endIf
if c.b then
camera.z -= 0.05
endIf
if c.y then
rotation -= 0.5
endIf
if c.a then
rotation += 0.5
endIf
setSpriteCamera( camera.x, camera.y, camera.z )
setSpriteCameraRotation( rotation )
updateSprites()
drawSprites()
update()
repeat
Associated Commands
equals, lessThan, greaterThan, lessThanEquals, greaterThanEquals, notEquals