notEquals
Purpose
Not equals operator !=
Description
This is true if the value of first expression is not equal to the value of the second
Syntax
result = expression1 != expression2
Arguments
result true if value of expression1 is not equal to the value of expression2
expression1 first expression
expression2 second expression
Example
radians( 1 )
image = loadImage( "Untied Games/Enemy small top C", false )
ship = createSprite( )
setSpriteImage( ship, image )
lastpos = { gwidth() / 2, gheight() / 2 }
setSpriteLocation( ship, lastpos )
setSpriteScale( ship, { 4, 4 } )
loop
clear( )
c = controls( 0 )
printAt( 0, 0, "Use left joystick to control sprite" )
setSpriteSpeed( ship, { 480 * c.lx, -480 * c.ly } )
curpos = getSpriteLocation( ship )
if( curpos != lastpos ) then
setSpriteRotation( ship, -pi / 2 + atan2(curpos.y - lastpos.y, curpos.x - lastpos.x) )
lastpos = curpos
endIf
updateSprites()
drawSprites()
update()
repeat
Associated Commands
equals, lessThan, greaterThan, lessThanEquals, greaterThanEquals, notEquals