CON tips:
- You can use structure members as variables. For example
spawnvar sprite[].hitag. Note that
sprite is used instead of
get/setactor.
- It's not necessary to differentiate between commands like
setvar and
setvarvar anymore. There's used to be a performance gain, but that's no longer the case. Use the command that can read gamevars.
-
[] can replace
[THISACTOR].
- The local actor, player or player distance can be set using
vm_actor / vm_player / vm_distance. The value of
THISCTOR usually equals
vm_actor, but
player[THISACTOR] equals
vm_player. Commands like
ifpdistl use
vm_distance to determine the condition. Note that
vm_distance is not always set by the game for performance reasons.
- You can loop using
for. For example the code inside of
for myvar allsprites {} will apply to all sprites. Note that you cannot use
killit inside of this or it will break the loop. Using
break / return may cause issues too. List of valid
for values:
allsprites
allspritesbystat
allspritesbysect
allsectors
allwalls
activelights / lights
drawnsprites
spritesofsector / sprofsec
spritesofstatus / sprofstat
loopofwall
wallsofsector / walofsec
range
Use
range with
NUMSECTORS / NUMWALLS / MULTIMODE to loop through all sectors, walls or players.
- Command aliases:
#define / define
#include / include
abs / klabs
add / addvarvar
al / addlogvar
and / andvarvar
array / gamearray
ck / cheatkeys
dc / definecheat
div / divvarvar / divrd
eqspawn / eqspawnvar
eshoot / eshootvar
espawn / espawnvar
ezshoot / ezshootvar
findnearactor / findnearactorvar
findnearactor3d / findnearactor3dvar
findnearactorz / findnearactorzvar
findnearsprite / findnearspritevar
findnearsprite3d / findnearsprite3dvar
findnearspritez / findnearspritezvar
geta / getactor
getav / getactorvar
geti / getinput
getp / getplayer
getpv / getplayervar
gets / getsector
getu / getuserdef
getw / getwall
ifa / ifvarvara
ifae / ifvarvarae
ifand / ifvarvarand
ifb / ifvarvarb
ifbe / ifvarvarbe
ifboth / ifvarvarboth
ife / ifvarvare
ifeither / ifvarvareither
ifg / ifvarvarg
ifge / ifvarvarge
ifl / ifvarvarl
ifle / ifvarvarle
ifn / ifvarvarn
ifor / ifvarvaror
ifxor / ifvarvarxor
mod / modvarvar
mul / mulvarvar
or / orvarvar
print / quote
qputs / redefinequote
qspawn / qspawnvar
rand / randvarvar
set / setvarvar
seta / setactor
setav / setactorvar
seti / setinput
setp / setplayer
setpv / setplayervar
sets / setsector
setu / setuserdef
setw / setwall
shiftl / shiftvarvarl
shiftr / shiftvarvarr
shoot / shootvar
string / definequote
sub / subvarvar
var / gamevar
whilel / whilevarvarl
whilen / whilevarvarn
xor / xorvarvar
zshoot / zshootvar