Fuze Arena Logo
  • Forum
  • Creations
    Catalogue Showcase
  • Help

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

and, else, endIf, if, or, then

logo

©2019 FUZE Technologies Ltd. FUZE is a registered trademark of FUZE Technologies Ltd. All rights reserved.

Useful links

  • Fuze Main Site
  • Fuze Arena on Twitter
  • Fuze Arena on Youtube
  • Download Buyer

Contact Information

  • FUZE Technologies Ltd
    15 Clearfields Farm
    Wotton Underwood
    Aylesbury, Buckinghamshire
    ​England, HP18 0RS

  • +44 (0) 1844 239 432

  • contact@fuze.co.uk

© Copyright FUZE Technologies Ltd. All rights reserved.