M32 script commands

From EDukeWiki
Revision as of 13:58, 3 August 2010 by Helixhorned (talk | contribs) (corrected mulscale)
Jump to navigation Jump to search
Mapster32 Scripting

This is a categorized list of every command in Mapster32-script.

Legend:
I: acts on current sprite, S: acts on current sprite by pointer (also valid in "for i drawnsprites")
i: sets current sprite, s: only sets current sprite by pointer
D: differs from CON, X: deprecated/do not use (yet)
var/array/special: must be writable, [something]: optional command field

basic commands

control flow

struct access (redundant)

All of these are redundant, use "set xyz zyx" instead.

arrays

var commands

varvar commands

math commands

special commands

  • Sort array count [comparison_state]
  • For itervar what [what2]

valid iteration types (what):
Note: where the current sprite is affected, it is restored at the end of the loop

  • allsprites (i), allsectors, allwalls, selsprites (i), selsectors, selwalls, drawnsprites (s, indexes tsprite[])
  • spritesofsector sector (i), loopofwall wall, wallsofsector sector, range num

var if* and while* commands

varvar if* and while* commands

other if* commands

BUILD functions

debugging commands

quote commands

Specifying a negative max argument will make the allowable number range be max to -max:

findnear* (not tested)

misc. commands

current sprite commands

drawing commands

used in EVENT_DRAW2DSCREEN
used elsewhere

sound commands

All sound commands accept vars. Sounds should appear from current sprite if set and globally otherwise (not tested).