Category:All commands: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
No edit summary
Whoops, looks like range is only for mapster32
(23 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]]
*[[definevolumename]]
*[[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]]
*[[onevent]]
 
*[[endevent]]
==Flow Control==
==Flow Control==
===If Components===
*[[nullop]]
*[[nullop]]
*[[else]]
*[[else]]
===Switch===
*[[switch]]
*[[switch]]
*[[endswitch]]
*[[endswitch]]
*[[case]]
*[[case]]
*[[default]]
*[[default]]
===Termination===
*[[break]]
*[[break]]
*[[return]]
===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]]
*[[whilevarn]]
*[[whilevarn]]
*[[whilevarvarn]]
*[[whilevarvarn]]
:''It is also possible to loop by calling a state from within itself.''
==Game Variables==
==Game Variables==
*[[gamevar]]
*[[gamevar]]
*[[gamearray]]
===Gamevar Operators===
===Gamevar Operators===
*[[setvar]]
*[[setvar]]
*[[setvarvar]]
*[[setvarvar]]
*[[setarray]]
*[[addvar]]
*[[addvar]]
*[[addvarvar]]
*[[addvarvar]]
Line 100: Line 131:
*[[getangle]]
*[[getangle]]
*[[getincangle]]
*[[getincangle]]
===Arrays===
===Array Operations===
*[[gamearray]]
*[[setarray]]
*[[getarraysize]]
*[[getarraysize]]
*[[getarraysequence]]
*[[resizearray]]
*[[resizearray]]
*[[copy]]
*[[copy]]
*[[setarray]]
*[[setarraysequence]]
===Data Saving===
*[[readgamevar]]
*[[savegamevar]]
*[[readarrayfromfile]]
*[[writearraytofile]]
==Structure Access==
==Structure Access==
*[[getactor]]
*[[getactor]]
Line 130: Line 168:
*[[setwall]]
*[[setwall]]
==Actors==
==Actors==
===Settings===
===Structures===
====Commands====
*[[cactor]] <!-- picnum -->
*[[cactor]]
*[[action]] <!-- htg_t 4 (2, 3) -->
*[[action]]
*[[ai]] <!-- htg_t 5 (1?) -->
*[[ai]]
*[[move]] <!-- htg_t 1 -->
*[[move]]
*[[count]] <!-- htg_t 0 -->
*[[count]]
*[[resetactioncount]] <!-- htg_t 2 -->
*[[resetactioncount]]
*[[resetcount]] <!-- htg_t 0 -->
*[[resetcount]]
*[[cstat]] <!-- cstat -->
*[[cstat]]
*[[cstator]] <!-- cstat -->
*[[cstator]]
*[[clipdist]] <!-- clipdist -->
*[[clipdist]]
*[[sizeat]] <!-- [xy]repeat -->
*[[sizeat]]
*[[sizeto]] <!-- [xy]repeat -->
*[[sizeto]]
*[[strength]] <!-- extra -->
*[[strength]]
*[[addstrength]] <!-- extra -->
*[[addstrength]]
*[[spritepal]] <!-- pal -->
*[[spritepal]]
*[[getlastpal]] <!-- httempang -->
*[[getlastpal]]
*[[sleeptime]] <!-- httimetosleep -->
*[[sleeptime]]
*[[spriteflags]] <!-- htflags -->
*[[spriteflags]]
*[[angoff]] <!-- angoff -->
*[[angoff]]
*[[angoffvar]] <!-- angoff -->
*[[angoffvar]]
*[[changespritesect]] <!-- sectnum -->
*[[fall]]
*[[changespritestat]] <!-- statnum -->
*[[insertspriteq]]
*[[setsprite]] <!-- [xyz] -->
*[[killit]]
====If====
====If====
*[[ifactor]]
*[[ifactor]]
Line 169: Line 206:
*[[ifdead]]
*[[ifdead]]
*[[ifactornotstayput]]
*[[ifactornotstayput]]
===Manipulation===
===Commands===
*[[changespritesect]]
*[[fall]]
*[[changespritestat]]
*[[insertspriteq]]
*[[killit]]
*[[movesprite]]
*[[movesprite]]
*[[ssp]]
*[[clipmove]]
*[[clipmove]]
*[[clipmovenoslide]]
*[[clipmovenoslide]]
*[[setsprite]]
===Measurements===
===Measurements===
*[[dist]]
*[[dist]]
Line 183: Line 221:
===Surroundings===
===Surroundings===
====Commands====
====Commands====
*[[hitradius]]
*[[hitradiusvar]]
*[[flash]]
*[[flash]]
====If====
====If====
Line 197: Line 237:
*[[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 206: Line 247:
*[[ifcanshoottarget]]
*[[ifcanshoottarget]]
*[[ifhitspace]]
*[[ifhitspace]]
*[[getangletotarget]]
===Spawning===
===Spawning===
*[[spawn]]
*[[spawn]]
Line 231: Line 273:
*[[ezshoot]]
*[[ezshoot]]
*[[ezshootvar]]
*[[ezshootvar]]
*[[hitradius]]
*[[hitradiusvar]]
==Player==
==Player==
===Commands===
===Commands===
Line 241: Line 281:
*[[addphealth]]
*[[addphealth]]
*[[tossweapon]]
*[[tossweapon]]
*[[resetplayer]]
*[[lockplayer]]
*[[gmaxammo]]
*[[gmaxammo]]
*[[smaxammo]]
*[[smaxammo]]
Line 248: Line 286:
*[[checkavailweapon]]
*[[checkavailweapon]]
*[[addkills]]
*[[addkills]]
*[[lockplayer]]
*[[resetplayer]]
*[[resetplayerflags]]
===If===
===If===
*[[ifgotweaponce]]
*[[ifgotweaponce]]
Line 255: Line 296:
*[[ifphealthl]]
*[[ifphealthl]]
*[[ifpinventory]]
*[[ifpinventory]]
*[[ifplayersl]]
==Sectors==
==Sectors==
===Operating===
===Operating===
Line 263: Line 305:
*[[operatesectors]]
*[[operatesectors]]
*[[activatebysector]]
*[[activatebysector]]
*[[activate]]
===Manipulation===
===Manipulation===
*[[dragpoint]]
*[[dragpoint]]
*[[sectsetinterpolation]]
*[[sectclearinterpolation]]
*[[sectclearinterpolation]]
*[[sectorofwall]]
*[[sectsetinterpolation]]
===Analysis===
===Analysis===
*[[getceilzofslope]]
*[[getceilzofslope]]
Line 276: Line 318:
*[[checkactivatormotion]]
*[[checkactivatormotion]]
*[[rotatepoint]]
*[[rotatepoint]]
*[[lineintersect]]
*[[rayintersect]]
*[[sectorofwall]]
==Discovery==
==Discovery==
===Searching===
===Searching===
Line 310: Line 355:
*[[globalsound]]
*[[globalsound]]
*[[globalsoundvar]]
*[[globalsoundvar]]
*[[screensound]]
*[[stopsound]]
*[[stopsound]]
*[[stopsoundvar]]
*[[stopsoundvar]]
Line 317: Line 363:
*[[ifactorsound]]
*[[ifactorsound]]
*[[ifnosounds]]
*[[ifnosounds]]
*[[setactorsoundpitch]]
===Music===
===Music===
*[[music]]
*[[music]]
*[[starttrack]]
*[[starttrack]]
*[[starttrackvar]]
*[[starttrackvar]]
*[[getmusicposition]]
*[[setmusicposition]]
==Quotes==
==Quotes==
*[[definequote]]
*[[definequote]]
Line 327: Line 376:
*[[userquote]]
*[[userquote]]
*[[qsprintf]]
*[[qsprintf]]
*[[qstrcpy]]
*[[qstrcat]]
*[[qstrcat]]
*[[qstrcpy]]
*[[qstrncat]]
*[[qstrlen]]
*[[qstrlen]]
*[[qstrncat]]
*[[qsubstr]]
*[[qsubstr]]
*[[qstrdim]]
*[[qgetsysstr]]
*[[qgetsysstr]]
*[[getpname]]
*[[getpname]]
*[[getkeyname]]
*[[getkeyname]]
==Cutscenes==
*[[startcutscene]]
*[[ifcutscene]]
==Screen==
==Screen==
===Screen Manipulation===
===Screen Manipulation===
*[[palfrom]]
*[[palfrom]]
*[[wackplayer]]
*[[quake]]
*[[guniqhudid]]
*[[guniqhudid]]
*[[setgamepalette]]
*[[setgamepalette]]
*[[setaspect]]
*[[setaspect]]
===Player Actions===
===Player Actions===
*[[wackplayer]]
*[[quake]]
*[[pkick]]
*[[pkick]]
*[[pstomp]]
*[[pstomp]]
Line 350: Line 403:
*[[rotatesprite]]
*[[rotatesprite]]
*[[rotatesprite16]]
*[[rotatesprite16]]
*[[rotatespritea]]
*[[screentext]]
*[[gametext]]
*[[gametext]]
*[[gametextz]]
*[[gametextz]]
Line 356: Line 411:
*[[digitalnumberz]]
*[[digitalnumberz]]
*[[showview]]
*[[showview]]
*[[showviewunbiased]]
===Math===
===Math===
*[[displayrand]]
*[[displayrand]]
Line 368: Line 424:
*[[inittimer]]
*[[inittimer]]
*[[endofgame]]
*[[endofgame]]
==Data Saving==
*[[endoflevel]]
*[[cmenu]]
==Game Saving==
*[[save]]
*[[save]]
*[[savenn]]
*[[savenn]]
*[[readgamevar]]
*[[savegamevar]]
*[[readarrayfromfile]]
*[[writearraytofile]]
===Hub Maps===
===Hub Maps===
*[[loadmapstate]]
*[[loadmapstate]]
Line 383: Line 437:
*[[addlog]]
*[[addlog]]
*[[addlogvar]]
*[[addlogvar]]
==Unsorted==
*[[echo]]
*[[cmenu]]
*[[getangletotarget]]
*[[ifrnd]]
*[[lineintersect]]
*[[rayintersect]]
*[[return]]
*[[ssp]]
==Deprecated==
==Deprecated==
*[[betaname]]
*[[betaname]]
Line 396: Line 443:
*[[eventloadactor]]
*[[eventloadactor]]
*[[time]]
*[[time]]
*[[shadeto]]
===Screen Drawing===
===Screen Drawing===
*[[myos]]
*[[myos]]
Line 413: Line 461:
*[[setplayerangle]]
*[[setplayerangle]]


[[Category:All commands]]
[[Category:Scripting documentation]]

Revision as of 19:44, 6 July 2020

EDuke32 Scripting

Preprocessor

Meta-Settings

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

Gamevar Conditions

Math Operations

Array Operations

Data Saving

Structure Access

Actors

Structures

If

Commands

Measurements

Surroundings

Commands

If

Mapping Features

Player Interaction

Spawning

Materials

Projectiles

Player

Commands

If

Sectors

Operating

Manipulation

Analysis

Discovery

Searching

Sorting

Audio

Sounds

Music

Quotes

Cutscenes

Screen

Screen Manipulation

Player Actions

Screen Drawing

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.

E

G

I

P

S