M32 script commands: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
added fixrepeats, minor changes
m corrected printmessage256
Line 193: Line 193:
*[[Error]] ''quotenum''
*[[Error]] ''quotenum''
*[[Printmessage16]] ''quotenum''
*[[Printmessage16]] ''quotenum''
*[[Printmessage256]] ''quotenum'' ''x'' ''y'' ''col'' ''backcol'' ''fontsize''
*[[Printmessage256]] ''quotenum'' ''x'' ''y''
*[[Printext256]] ''quotenum'' ''x'' ''y'' ''col'' ''backcol'' ''fontsize''
*[[Printext256]] ''quotenum'' ''x'' ''y'' ''col'' ''backcol'' ''fontsize''
*[[Printext16]] ''quotenum'' ''x'' ''y'' ''col'' ''backcol'' ''fontsize''
*[[Printext16]] ''quotenum'' ''x'' ''y'' ''col'' ''backcol'' ''fontsize''

Revision as of 11:48, 2 August 2010

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).