Fuze Arena Logo
  • Forum
  • Creations
    Catalogue Showcase
  • Help

lessThanEquals

Purpose

Less than or equal operator <=

Description

This is true if the value of first expression is less than or equal to the value of the second

Syntax

result = expression1 <= expression2

Arguments

result true if value of expression1 is less or equal to the value of expression2

expression1 first expression

expression2 second expression

Example

pos = { 960, 540 }
vel = { 0, 0 }
col = { 1, 0, 0, 1 }
rt = createImage( 1920, 1080, true, image_rgb )
loop
    c = controls( 0 )
    vel += { c.lx, -c.ly }
    pos += vel
    vel *= 0.95

    if col.r > 0 and col.b <= 0 then
        col.r -= 0.01
        col.g += 0.01
    else
        if col.g > 0 then
            col.g -= 0.01
            col.b += 0.01
        else
            col.b -= 0.01
            col.r += 0.01
        endIf
    endIf

    setDrawTarget( rt )
    box( 0, 0, 1920, 1080, { 0, 0, 0, 0.25 }, false )
    circle( pos.x, pos.y, 50, 32, col, false )

    setDrawTarget( framebuffer )
    clear()
    renderEffect( rt, framebuffer, fx_motionblur, [ 1 / 1920, 1 / 1080, vel.x / 2, vel.y / 2 ] )

    update()
repeat

Associated Commands

equals, lessThan, greaterThan, lessThanEquals, greaterThanEquals, notEquals

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.