Kray3 SDK/Script basics

From Kray
Revision as of 09:47, 15 August 2012 by Jure (Talk | contribs) (Script Basics)

Jump to: navigation, search

Script Basics

Welcome to Kray3 Script! Kray script is scripting language that allows you to control Kray render engine. It is very easy to use it so anyone can try it, although any previous programming background experience will come handy.

In this first section we will explore basic data types and operations that you can use in Kray Script.

Data Types

Numbers

Double

Double is a type of variable for numbers. It contains twice as many binary digits.

Vector

Matrix

Arithmetic operations

Variables

Functions

function MyFunction(string text,var num){ echo Function args are +text+ and +num; }

Loops and Conditional statements

There are two statements available in Kray script: IF and WHILE:

while

Executes code as long as condition is true

while {....}

if

Executes code if condition is true.

if {... }

Common commands

echo

help