Category:All commands: Difference between revisions
Jump to navigation
Jump to search
Hendricks266 (talk | contribs) No edit summary |
Doom64hunter (talk | contribs) |
||
(30 intermediate revisions by 4 users not shown) | |||
Line 3: | Line 3: | ||
==Preprocessor== | ==Preprocessor== | ||
*[[include]] | *[[include]] | ||
*[[includedefault]] | |||
*[[define]] | *[[define]] | ||
*// single-line comment | |||
*/* block comment */ | |||
*whitespace characters: <code>( ) ; ,</code> | |||
==Meta-Settings== | ==Meta-Settings== | ||
<!-- These deal with matters outside the game world. --> | |||
*[[dynamicremap]] | *[[dynamicremap]] | ||
*[[dynamicsoundremap]] | |||
*[[setcfgname]] | *[[setcfgname]] | ||
*[[setdefname]] | *[[setdefname]] | ||
Line 15: | Line 21: | ||
*[[definegamefuncname]] | *[[definegamefuncname]] | ||
*[[definegametype]] | *[[definegametype]] | ||
*[[definevolumename]] | |||
*[[definevolumeflags]] | |||
*[[definelevelname]] | *[[definelevelname]] | ||
*[[defineskillname]] | *[[defineskillname]] | ||
*[[ | *[[undefinevolume]] | ||
*[[undefinelevel]] | |||
*[[undefineskill]] | |||
===If=== | ===If=== | ||
*[[ifrespawn]] | *[[ifrespawn]] | ||
Line 24: | Line 34: | ||
*[[ifserver]] | *[[ifserver]] | ||
==Global Settings== | ==Global Settings== | ||
<!-- These deal with matters inside the game world. --> | |||
*[[gamestartup]] | *[[gamestartup]] | ||
*[[spritenopal]] | *[[spritenopal]] | ||
Line 30: | Line 41: | ||
*[[spriteshadow]] | *[[spriteshadow]] | ||
==Block Delimiting== | ==Block Delimiting== | ||
===Object-Oriented=== | |||
*[[actor]] | *[[actor]] | ||
*[[useractor]] | *[[useractor]] | ||
*[[enda]] | *[[enda]] | ||
===Procedural=== | |||
*[[onevent]] | |||
*[[appendevent]] | |||
*[[endevent]] | |||
===Subroutines=== | |||
*[[state]] | *[[state]] | ||
*[[defstate]] | |||
*[[ends]] | *[[ends]] | ||
*[[ | *[[prependstate]] | ||
*[[ | *[[appendstate]] | ||
==Flow Control== | ==Flow Control== | ||
===If Components=== | |||
*[[nullop]] | *[[nullop]] | ||
*[[else]] | *[[else]] | ||
===Switch=== | |||
*[[switch]] | *[[switch]] | ||
*[[endswitch]] | *[[endswitch]] | ||
*[[case]] | *[[case]] | ||
*[[default]] | *[[default]] | ||
===Termination=== | |||
*[[break]] | *[[break]] | ||
*[[continue]] | |||
*[[exit]] | |||
*[[return]] | |||
*[[terminate]] | |||
===Jump=== | |||
:''Note: Jumping commands are deprecated and will not be supported by Lunatic. Use [[#Loops|loops]] instead.'' | |||
*[[getcurraddress]] | *[[getcurraddress]] | ||
*[[jump]] | *[[jump]] | ||
==Loops== | |||
===Loops=== | |||
*[[whilevarl]] | |||
*[[whilevarvarl]] | |||
*[[whilevare]] | |||
*[[whilevarn]] | *[[whilevarn]] | ||
*[[whilevarvarn]] | *[[whilevarvarn]] | ||
== | :''It is also possible to loop by calling a state from within itself.'' | ||
=== | |||
==== | ==Game Variables== | ||
*[[cactor]] | *[[gamevar]] | ||
*[[action]] | *[[gamearray]] | ||
*[[ai]] | ===Gamevar Operators=== | ||
*[[move]] | *[[setvar]] | ||
*[[count]] | *[[setvarvar]] | ||
*[[resetactioncount]] | *[[setarray]] | ||
*[[resetcount]] | *[[addvar]] | ||
*[[cstat]] | *[[addvarvar]] | ||
*[[cstator]] | *[[subvar]] | ||
*[[clipdist]] | *[[subvarvar]] | ||
*[[sizeat]] | *[[mulvar]] | ||
*[[sizeto]] | *[[mulvarvar]] | ||
*[[strength]] | *[[divvar]] | ||
*[[addstrength]] | *[[divvarvar]] | ||
*[[spritepal]] | *[[modvar]] | ||
*[[getlastpal]] | *[[modvarvar]] | ||
*[[sleeptime]] | *[[andvar]] | ||
*[[ | *[[andvarvar]] | ||
*[[ | *[[orvar]] | ||
*[[ | *[[orvarvar]] | ||
*[[xorvar]] | |||
*[[ | *[[xorvarvar]] | ||
*[[ | *[[randvar]] | ||
*[[ | *[[randvarvar]] | ||
===Gamevar Conditions=== | |||
*[[ifvare]] | |||
*[[ifvarn]] | |||
*[[ifvarg]] | |||
*[[ifvarl]] | |||
*[[ifvarand]] | |||
*[[ifvaror]] | |||
*[[ifvarxor]] | |||
*[[ifvareither]] | |||
*[[ifvarvare]] | |||
*[[ifvarvarn]] | |||
*[[ifvarvarg]] | |||
*[[ifvarvarl]] | |||
*[[ifvarvarand]] | |||
*[[ifvarvaror]] | |||
*[[ifvarvarxor]] | |||
*[[ifvarvareither]] | |||
===Math Operations=== | |||
*[[sqrt]] | |||
*[[calchypotenuse]] | |||
*[[sin]] | |||
*[[cos]] | |||
*[[shiftvarl]] | |||
*[[shiftvarr]] | |||
*[[mulscale]] | |||
*[[getangle]] | |||
*[[getincangle]] | |||
===Array Operations=== | |||
*[[getarraysize]] | |||
*[[getarraysequence]] | |||
*[[resizearray]] | |||
*[[copy]] | |||
*[[setarray]] | |||
*[[setarraysequence]] | |||
===Data Saving=== | |||
*[[readgamevar]] | |||
*[[savegamevar]] | |||
*[[readarrayfromfile]] | |||
*[[writearraytofile]] | |||
==Structure Access== | |||
*[[getactor]] | |||
*[[getactorvar]] | |||
*[[getinput]] | |||
*[[getplayer]] | |||
*[[getplayervar]] | |||
*[[getprojectile]] | |||
*[[getsector]] | |||
*[[getthisprojectile]] | |||
*[[gettspr]] | |||
*[[getuserdef]] | |||
*[[getwall]] | |||
*[[setactor]] | |||
*[[setactorvar]] | |||
*[[setinput]] | |||
*[[setplayer]] | |||
*[[setplayervar]] | |||
*[[setprojectile]] | |||
*[[setsector]] | |||
*[[setthisprojectile]] | |||
*[[settspr]] | |||
*[[setuserdef]] | |||
*[[setwall]] | |||
==Actors== | |||
===Structures=== | |||
*[[cactor]] <!-- picnum --> | |||
*[[action]] <!-- htg_t 4 (2, 3) --> | |||
*[[ai]] <!-- htg_t 5 (1?) --> | |||
*[[move]] <!-- htg_t 1 --> | |||
*[[count]] <!-- htg_t 0 --> | |||
*[[resetactioncount]] <!-- htg_t 2 --> | |||
*[[resetcount]] <!-- htg_t 0 --> | |||
*[[cstat]] <!-- cstat --> | |||
*[[cstator]] <!-- cstat --> | |||
*[[clipdist]] <!-- clipdist --> | |||
*[[sizeat]] <!-- [xy]repeat --> | |||
*[[sizeto]] <!-- [xy]repeat --> | |||
*[[strength]] <!-- extra --> | |||
*[[addstrength]] <!-- extra --> | |||
*[[spritepal]] <!-- pal --> | |||
*[[getlastpal]] <!-- httempang --> | |||
*[[sleeptime]] <!-- httimetosleep --> | |||
*[[spriteflags]] <!-- htflags --> | |||
*[[angoff]] <!-- angoff --> | |||
*[[angoffvar]] <!-- angoff --> | |||
*[[changespritesect]] <!-- sectnum --> | |||
*[[changespritestat]] <!-- statnum --> | |||
*[[setsprite]] <!-- [xyz] --> | |||
====If==== | ====If==== | ||
*[[ifactor]] | *[[ifactor]] | ||
Line 92: | Line 213: | ||
*[[ifdead]] | *[[ifdead]] | ||
*[[ifactornotstayput]] | *[[ifactornotstayput]] | ||
===Commands=== | |||
*[[fall]] | |||
*[[insertspriteq]] | |||
*[[killit]] | |||
*[[movesprite]] | |||
*[[ssp]] | |||
*[[clipmove]] | |||
*[[clipmovenoslide]] | |||
===Measurements=== | |||
*[[dist]] | |||
*[[ldist]] | |||
*[[cansee]] | |||
*[[canseespr]] | |||
===Surroundings=== | ===Surroundings=== | ||
====Commands==== | ====Commands==== | ||
*[[hitradius]] | |||
*[[hitradiusvar]] | |||
*[[flash]] | *[[flash]] | ||
====If==== | ====If==== | ||
Line 108: | Line 244: | ||
*[[ifinspace]] | *[[ifinspace]] | ||
*[[ifinouterspace]] | *[[ifinouterspace]] | ||
*[[ifrnd]] <!-- This is here because it really only has a use in actor code. --> | |||
===Mapping Features=== | ===Mapping Features=== | ||
*[[mikesnd]] | *[[mikesnd]] | ||
Line 117: | Line 254: | ||
*[[ifcanshoottarget]] | *[[ifcanshoottarget]] | ||
*[[ifhitspace]] | *[[ifhitspace]] | ||
*[[getangletotarget]] | |||
===Spawning=== | |||
*[[spawn]] | |||
*[[espawn]] | |||
*[[espawnvar]] | |||
*[[qspawn]] | |||
*[[qspawnvar]] | |||
*[[eqspawn]] | |||
*[[eqspawnvar]] | |||
===Materials=== | |||
*[[debris]] | |||
*[[guts]] | |||
*[[lotsofglass]] | |||
*[[mail]] | |||
*[[money]] | |||
*[[paper]] | |||
==Projectiles== | |||
*[[defineprojectile]] | |||
*[[shoot]] | |||
*[[shootvar]] | |||
*[[eshoot]] | |||
*[[eshootvar]] | |||
*[[zshoot]] | |||
*[[zshootvar]] | |||
*[[ezshoot]] | |||
*[[ezshootvar]] | |||
==Player== | ==Player== | ||
===Commands=== | ===Commands=== | ||
Line 125: | Line 288: | ||
*[[addphealth]] | *[[addphealth]] | ||
*[[tossweapon]] | *[[tossweapon]] | ||
*[[gmaxammo]] | *[[gmaxammo]] | ||
*[[smaxammo]] | *[[smaxammo]] | ||
*[[checkavailinven]] | *[[checkavailinven]] | ||
*[[checkavailweapon]] | *[[checkavailweapon]] | ||
*[[addkills]] | |||
*[[lockplayer]] | |||
*[[resetplayer]] | |||
*[[resetplayerflags]] | |||
===If=== | ===If=== | ||
*[[ifgotweaponce]] | *[[ifgotweaponce]] | ||
Line 138: | Line 303: | ||
*[[ifphealthl]] | *[[ifphealthl]] | ||
*[[ifpinventory]] | *[[ifpinventory]] | ||
*[[ifplayersl]] | |||
==Sectors== | |||
===Operating=== | |||
*[[operate]] | |||
*[[operateactivators]] | |||
*[[operatemasterswitches]] | |||
*[[operaterespawns]] | |||
*[[operatesectors]] | |||
*[[activatebysector]] | |||
*[[activate]] | |||
===Manipulation=== | |||
*[[dragpoint]] | |||
*[[sectsetinterpolation]] | |||
*[[sectclearinterpolation]] | |||
===Analysis=== | |||
*[[getceilzofslope]] | |||
*[[getflorzofslope]] | |||
*[[getzrange]] | |||
*[[updatesector]] | |||
*[[updatesectorz]] | |||
*[[checkactivatormotion]] | |||
*[[ | *[[rotatepoint]] | ||
*[[lineintersect]] | |||
== | *[[rayintersect]] | ||
*[[sectorofwall]] | |||
==Discovery== | |||
===Searching=== | |||
== | |||
*[[ | |||
*[[ | |||
*[[ | |||
*[[ | |||
*[[ | |||
*[[ | |||
*[[ | |||
== | |||
*[[ | |||
*[[ | |||
*[[ | |||
== | |||
*[[ | |||
*[[ | |||
*[[ | |||
*[[ | |||
*[[ | |||
*[[ | |||
*[[ | |||
*[[ | |||
*[[ | |||
*[[ | |||
== | |||
== | |||
*[[findnearactor]] | *[[findnearactor]] | ||
*[[findnearactor3d]] | *[[findnearactor3d]] | ||
Line 254: | Line 345: | ||
*[[findplayer]] | *[[findplayer]] | ||
*[[neartag]] | *[[neartag]] | ||
*[[hitscan]] | |||
===Sorting=== | |||
*[[headspritesect]] | |||
*[[headspritestat]] | |||
*[[nextspritesect]] | |||
*[[nextspritestat]] | |||
*[[prevspritesect]] | |||
*[[prevspritestat]] | |||
*[[ | |||
=== | |||
*[[ | |||
*[[ | |||
*[[ | |||
*[[ | |||
*[[ | |||
*[[ | |||
==Audio== | ==Audio== | ||
===Sounds=== | ===Sounds=== | ||
Line 289: | Line 362: | ||
*[[globalsound]] | *[[globalsound]] | ||
*[[globalsoundvar]] | *[[globalsoundvar]] | ||
*[[screensound]] | |||
*[[stopsound]] | *[[stopsound]] | ||
*[[stopsoundvar]] | *[[stopsoundvar]] | ||
Line 296: | Line 370: | ||
*[[ifactorsound]] | *[[ifactorsound]] | ||
*[[ifnosounds]] | *[[ifnosounds]] | ||
*[[setactorsoundpitch]] | |||
===Music=== | ===Music=== | ||
*[[music]] | *[[music]] | ||
*[[starttrack]] | *[[starttrack]] | ||
*[[starttrackvar]] | *[[starttrackvar]] | ||
*[[getmusicposition]] | |||
*[[setmusicposition]] | |||
==Quotes== | ==Quotes== | ||
*[[definequote]] | *[[definequote]] | ||
Line 306: | Line 383: | ||
*[[userquote]] | *[[userquote]] | ||
*[[qsprintf]] | *[[qsprintf]] | ||
*[[qstrcpy]] | |||
*[[qstrcat]] | *[[qstrcat]] | ||
*[[ | *[[qstrncat]] | ||
*[[qstrlen]] | *[[qstrlen]] | ||
*[[qsubstr]] | *[[qsubstr]] | ||
*[[qstrdim]] | |||
*[[qgetsysstr]] | *[[qgetsysstr]] | ||
*[[getpname]] | *[[getpname]] | ||
*[[getkeyname]] | *[[getkeyname]] | ||
==Cutscenes== | |||
*[[startcutscene]] | |||
*[[ifcutscene]] | |||
==Screen== | ==Screen== | ||
===Screen Manipulation=== | ===Screen Manipulation=== | ||
*[[palfrom]] | *[[palfrom]] | ||
*[[guniqhudid]] | |||
*[[setgamepalette]] | |||
*[[setaspect]] | |||
===Player Actions=== | |||
*[[wackplayer]] | *[[wackplayer]] | ||
*[[quake]] | *[[quake]] | ||
*[[pkick]] | *[[pkick]] | ||
*[[pstomp]] | *[[pstomp]] | ||
Line 327: | Line 410: | ||
*[[rotatesprite]] | *[[rotatesprite]] | ||
*[[rotatesprite16]] | *[[rotatesprite16]] | ||
*[[rotatespritea]] | |||
*[[screentext]] | |||
*[[gametext]] | *[[gametext]] | ||
*[[gametextz]] | *[[gametextz]] | ||
Line 333: | Line 418: | ||
*[[digitalnumberz]] | *[[digitalnumberz]] | ||
*[[showview]] | *[[showview]] | ||
*[[showviewunbiased]] | |||
===Math=== | ===Math=== | ||
*[[displayrand]] | *[[displayrand]] | ||
*[[displayrandvar]] | *[[displayrandvar]] | ||
*[[displayrandvarvar]] | *[[displayrandvarvar]] | ||
== | ==Time Access== | ||
*[[ | *[[getticks]] | ||
*[[ | *[[gettimedate]] | ||
*[[ | ==Game-Changing== | ||
*[[ | *[[activatecheat]] | ||
*[[startlevel]] | |||
*[[inittimer]] | |||
*[[endofgame]] | |||
*[[endoflevel]] | |||
*[[cmenu]] | |||
==Game Saving== | |||
*[[save]] | |||
*[[savenn]] | |||
===Hub Maps=== | ===Hub Maps=== | ||
*[[loadmapstate]] | *[[loadmapstate]] | ||
Line 350: | Line 444: | ||
*[[addlog]] | *[[addlog]] | ||
*[[addlogvar]] | *[[addlogvar]] | ||
*[[echo]] | |||
*[[ | |||
==Deprecated== | ==Deprecated== | ||
*[[betaname]] | *[[betaname]] | ||
*[[enhanced]] | *[[enhanced]] | ||
*[[eventloadactor]] | *[[eventloadactor]] | ||
*[[time]] | |||
*[[shadeto]] | |||
===Screen Drawing=== | ===Screen Drawing=== | ||
*[[myos]] | *[[myos]] | ||
Line 407: | Line 468: | ||
*[[setplayerangle]] | *[[setplayerangle]] | ||
[[Category: | [[Category:Scripting documentation]] |
Latest revision as of 09:02, 7 January 2024
EDuke32 Scripting
Scripting · Full command list (alphabetized · categorized) · Event list · Structure members
Preprocessor
- include
- includedefault
- define
- // single-line comment
- /* block comment */
- whitespace characters:
( ) ; ,
Meta-Settings
- dynamicremap
- dynamicsoundremap
- setcfgname
- setdefname
- setgamename
- precache
- scriptsize
- cheatkeys
- definecheat
- definegamefuncname
- definegametype
- definevolumename
- definevolumeflags
- definelevelname
- defineskillname
- undefinevolume
- undefinelevel
- undefineskill
If
Global Settings
Block Delimiting
Object-Oriented
Procedural
Subroutines
Flow Control
If Components
Switch
Termination
Jump
- Note: Jumping commands are deprecated and will not be supported by Lunatic. Use loops instead.
Loops
- It is also possible to loop by calling a state from within itself.
Game Variables
Gamevar Operators
- setvar
- setvarvar
- setarray
- addvar
- addvarvar
- subvar
- subvarvar
- mulvar
- mulvarvar
- divvar
- divvarvar
- modvar
- modvarvar
- andvar
- andvarvar
- orvar
- orvarvar
- xorvar
- xorvarvar
- randvar
- randvarvar
Gamevar Conditions
- ifvare
- ifvarn
- ifvarg
- ifvarl
- ifvarand
- ifvaror
- ifvarxor
- ifvareither
- ifvarvare
- ifvarvarn
- ifvarvarg
- ifvarvarl
- ifvarvarand
- ifvarvaror
- ifvarvarxor
- ifvarvareither
Math Operations
Array Operations
Data Saving
Structure Access
- getactor
- getactorvar
- getinput
- getplayer
- getplayervar
- getprojectile
- getsector
- getthisprojectile
- gettspr
- getuserdef
- getwall
- setactor
- setactorvar
- setinput
- setplayer
- setplayervar
- setprojectile
- setsector
- setthisprojectile
- settspr
- setuserdef
- setwall
Actors
Structures
- cactor
- action
- ai
- move
- count
- resetactioncount
- resetcount
- cstat
- cstator
- clipdist
- sizeat
- sizeto
- strength
- addstrength
- spritepal
- getlastpal
- sleeptime
- spriteflags
- angoff
- angoffvar
- changespritesect
- changespritestat
- setsprite
If
- ifactor
- ifaction
- ifactioncount
- ifai
- ifcount
- ifmove
- ifspawnedby
- ifspritepal
- ifstrength
- ifhitweapon
- ifwasweapon
- ifdead
- ifactornotstayput
Commands
Measurements
Surroundings
Commands
If
- ifawayfromwall
- ifbulletnear
- ifceilingdistl
- iffloordistl
- ifgapzl
- ifsquished
- ifnotmoving
- ifinwater
- ifonwater
- ifoutside
- ifinspace
- ifinouterspace
- ifrnd
Mapping Features
Player Interaction
Spawning
Materials
Projectiles
Player
Commands
- addammo
- addinventory
- addweapon
- addweaponvar
- addphealth
- tossweapon
- gmaxammo
- smaxammo
- checkavailinven
- checkavailweapon
- addkills
- lockplayer
- resetplayer
- resetplayerflags
If
Sectors
Operating
- operate
- operateactivators
- operatemasterswitches
- operaterespawns
- operatesectors
- activatebysector
- activate
Manipulation
Analysis
- getceilzofslope
- getflorzofslope
- getzrange
- updatesector
- updatesectorz
- checkactivatormotion
- rotatepoint
- lineintersect
- rayintersect
- sectorofwall
Discovery
Searching
- findnearactor
- findnearactor3d
- findnearactor3dvar
- findnearactorvar
- findnearactorz
- findnearactorzvar
- findnearsprite
- findnearsprite3d
- findnearsprite3dvar
- findnearspritevar
- findnearspritez
- findnearspritezvar
- findotherplayer
- findplayer
- neartag
- hitscan
Sorting
Audio
Sounds
- definesound
- sound
- soundvar
- soundonce
- soundoncevar
- globalsound
- globalsoundvar
- screensound
- stopsound
- stopsoundvar
- stopactorsound
- stopallsounds
- ifsound
- ifactorsound
- ifnosounds
- setactorsoundpitch
Music
Quotes
- definequote
- redefinequote
- quote
- userquote
- qsprintf
- qstrcpy
- qstrcat
- qstrncat
- qstrlen
- qsubstr
- qstrdim
- qgetsysstr
- getpname
- getkeyname
Cutscenes
Screen
Screen Manipulation
Player Actions
Screen Drawing
- rotatesprite
- rotatesprite16
- rotatespritea
- screentext
- gametext
- gametextz
- minitext
- digitalnumber
- digitalnumberz
- showview
- showviewunbiased
Math
Time Access
Game-Changing
Game Saving
Hub Maps
Debug
Deprecated
Screen Drawing
Single-Use Structure Access
Subcategories
This category has the following 14 subcategories, out of 14 total.
D
- Duke3D 1.3/1.5 commands (110 P)
E
- EDuke commands (77 P)
- EDuke32 specific commands (254 P)
G
I
- If conditions (90 P)
P
S
- Screen drawing commands (22 P)
- Sound manipulation (24 P)
- String manipulation (18 P)