Home - Forums - Documentation - Gallery - Bugs
(New page: == Quest Expressions == '''Quest expressions start with "="''' Only supported for rewards. example: =2*@par === Operators === ==== functions ==== * @par -> dynamic parameter *...)
Line 25: Line 25:
* rgb
* rgb
* abs(number)
* abs(number)
-
* min(n1,n2) --> min
+
* min(n1,n2) -> min
-
* max(n1,n2) --> max
+
* max(n1,n2) -> max
* config
* config
-
* mousex() --> mousex
+
* mousex() -> mousex
-
* mousey() --> mousey
+
* mousey() -> mousey
* normalize(vector) --> normalized vector
* normalize(vector) --> normalized vector
* bb_mousex
* bb_mousex
Line 69: Line 69:
* readfile
* readfile
* writefile
* writefile
-
* getyrot(dx,dy) --> angle
+
* getyrot(dx,dy) -> angle
-
* vecx(vec) --> vec.x
+
* vecx(vec) -> vec.x
-
* vecy(vec) --> vec.y
+
* vecy(vec) -> vec.y
-
* vecz(vec) --> vec.z
+
* vecz(vec) -> vec.z
-
* colred(col) --> col.red
+
* colred(col) -> col.red
-
* colgreen(col) --> col.red
+
* colgreen(col) -> col.red
-
* colblue(col) --> col.red
+
* colblue(col) -> col.red
-
* getmsg(msg) --> translated message
+
* getmsg(msg) -> translated message
* key_node(sector,node,key,[value])
* key_node(sector,node,key,[value])
* key_meshobj(meshobj,key,[value])
* key_meshobj(meshobj,key,[value])

Revision as of 20:27, 27 October 2008

Contents

Quest Expressions

Quest expressions start with "="

Only supported for rewards.

example:

 =2*@par

Operators

functions

 * @par -> dynamic parameter
 * ?prop -> property from pcproperties
 * pc(name,[ent])
 * pctag(name, tag, [ent])
 * param
 * property(name,pcname)
 * id
 * parid
 * actid
 * propid
 * rgb
 * abs(number)
 * min(n1,n2) -> min
 * max(n1,n2) -> max
 * config
 * mousex() -> mousex
 * mousey() -> mousey
 * normalize(vector) --> normalized vector
 * bb_mousex
 * bb_mousey
 * cos(number) -> cos
 * sin(number)
 * tan(number)
 * acos(number)
 * asin(number)
 * atan(number)
 * sign(number) -> 
 * sqrt(number)
 * sqdist
 * hasclass
 * intpol(a,b,c)
 * int
 * float
 * bool
 * rand(number)
 * bb_testcollide
 * if(expr, trueexpr, falseexpr) 
 * entname() -> entity name
 * ent() -> entity, ent(entityname) -> entity
 * inventory_get
 * inventory_count
 * inventory_in
 * inventory_find
 * inventory_inname
 * inventory_findname
 * sound
 * sound_paused
 * strlen
 * strsub
 * stridx
 * scr_width
 * scr_height
 * testvar
 * chdirauto
 * readfile
 * writefile
 * getyrot(dx,dy) -> angle
 * vecx(vec) -> vec.x
 * vecy(vec) -> vec.y
 * vecz(vec) -> vec.z
 * colred(col) -> col.red
 * colgreen(col) -> col.red
 * colblue(col) -> col.red
 * getmsg(msg) -> translated message
 * key_node(sector,node,key,[value])
 * key_meshobj(meshobj,key,[value])
 * key_sector(sector,key,[value])
 * key_meshfact(meshfact,key,[value])
 * key_texture(texture,key,[value])
 * key_material(material,key,[value])
 * key_light(light,key,[value])


tokens

 * property()
 * action()
 * bb_movelayer
 * bb_move
 * bb_tofront
 * bb_toback
 * bb_up
 * bb_down
 * par
 * var
 * lvar
 * expr
 * while
 * if
 * for
 * print
 * call
 * case
 * mount
 * hitbeam
 * inherit
 * destroyentity
 * createentity
 * createpropclass
 * destroypropclass
 * default
 * inventory
 * inventory_add
 * inventory_rem
 * chdir
 * sound
 * sound_stop
 * sound_pause
 * sound_unpause
 * sound_restart
 * sound_volume
 * sound_speed
 * config_add
 * config_rem
 * config_set
 * config_save
 * class_add
 * class_rem
 * super
 * switch
 * strsplit
 * return
 * reporterror
 * variables
 * traceon
 * traceoff
 * callstack
 * selectentity
 * stop
 * randomize
 * quit
 * hidemouse
 * showmouse
 * navigationinfo


Examples

 * =if(mousex()<10,'left','right')


Annex 1: Dynamic parameters

If you use @par (instead of the already existing $par notation) you can get dynamic parameters from triggers. As opposed to static ($par) parameters these parameters can change every time the reward is fired. Currently there are the following limitations:

 * @par notation does not work in triggers (that will stay).
 * @par notation does not work in sequences.
 * Only the message trigger can currently send out such parameters.

Annex1: Trigger dynamic parameters

 * inventory --> child (name of added or removed entity)
 * meshsel --> entity (name of the selected entity)
 * trigger --> entity (name of the entity triggering)
| Article | Discussion | View source | History |