SCRIPTING FUNCTIONS

Sort alphabetically | Sort by category

All | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | R | S | T | U | V | Z


Mathematical functions

Standard mathematical functions.
Pay attention to variable types(!).

int a = 1 ;
int b = 1 ;
int c = 0 ;
math c = a + b ; add
math c = a - b ; subtract
math c = a * b ; multiply
math c = a / b ; division where result can be a float(!)
math a++ ; increment math c = a mod b ; modulus
math c = a div b ; division where result is automatically cast as integer(!)


MoveTo (whole assembly)

Unlike SetPosition function that works on an individual mesh in an assembly, MoveTo changes position of the entire assembly.

int retId = 0 ; [unique entity ID used in the current script only]
float3 moveToPosition = 0.0 0.0 0.0 ;
float duration = 4.0 ; [position interpolation time]
assemblyex MoveTo retId moveToPosition duration ;