

Defining a MAP.LST
==================




Open the Scenario you wish to modify and put a map.lst in its root directory.

Example:  scenario\cave\map.lst

The first line of the map list contains the # of objects

The next lines contain the object data

First is the object's name (not important yet), the object's script file, x position,
y position, object type, and the sprite number (starts with 0).

3
"boink","sign",64,32,3,5
"boink","ladder",32,32,3,3
"boink","robo",128,128,1,1

This will load 3 objects, and use sign.scr, ladder.scr, and robo.scr.

KEY:

Object ID:
3 = nonmoving object
2,1 = moving object
0 = player (don't ever add a player object, you will end up with 2 players on the map)

Sprite:
0=closed treasure chest
1=open treasure chest
2=ladder
3=stairs
5=sign
(this is all that's really usable at the moment)




*example map.lst*
1
"boink","sign",64,64,3,5

This will add 1 nonmoving object at 64,64 using sprite 5 (sign) and executing
with the file sign.scr.





***WARNING***

MAIN scripts execute one command per frame, while event scripts execute entirely
in one frame.


SCRIPTING COMMANDS
==================




MSG - specifies that a dialogue box should be enabled
=====================================================
Line immediately following is the number of lines in the text box.
Each line must be terminated with a \ within the quotes.

Example:

MSG
3
"This is\"
"a lame\"
"messagebox\"

Each line is limited to 39 characters (not including quotes, but including the \)
You have a maximum of 20 lines in the message box.




DELAY - specifies that the object should halt for a specified number of frames
==============================================================================

(Engine runs at 70fps, so a delay of 70 would be about 1 second)

Line immediately following is the number of frames to delay.

Example:

DELAY
300

There is no feasible cap on delays.  Object will still execute message scripts
while in DELAY operation (if called from MAIN).

Extras:

DELAY with a -1 frames will give you the option of choosing a random number
specified as a range in the next line

DELAY
-1
10,500

This will result in a delay of a random number of frames between 10 and 500.


MOVE - specifies that the object should move in a specified direction
=====================================================================

Line immediately following is the X,Y direction coordinate.

Example:

MOVE
-1,0

You may only move on the X or the Y axis at any time, script operation
will halt until the move is properly completed (Message scripts will
still be executable if called from MAIN)

Extras:

MOVE with a direction of 99 will let the engine choose a random number
between 0 and -1

MOVE
99,0

This will move the object randomly on the X axis.

Special Case:

MOVE
99,99

This will move the object randomly on both axises but will cap off diagonal options.



LOAD - specifies a scenario swap
================================

Line immediately following is the map to load, the X,Y coordinates to put the player
at, and the map's ID number.

Example:

LOAD
CAVE,64,96,1

This will load to the CAVE map, put the player at 64,96 and designate the CAVE map
as map id #1.

Drunkator's options:

CAVE=1
TOWN=2


ZAP - Halts execution of the current event processor.
=====================================================


Example:

HIT:
MSG
1
"Touch me again and you go to the Town\"
ZAP
END

HIT:
LOAD
CAVE,94,96,1
END

The first operation of the HIT function will ZAP itself, so that next
time the HIT message is received, the secondary HIT message will
execute rather than the first.




LZAP - Halts execution of a specified event processor
=====================================================


Example:

MAIN:
DELAY
300
LZAP
1
MSG
1
"Staircase is enabled\"
END

HIT:
END

HIT:
LOAD
CAVE,94,96,1
END



If the player tries sending HIT to the staircase for the first
300 frames of the script operation, nothing happens.  When
the delay is over from the MAIN function, the staircase zaps
its own dormant function, resulting in proper operation of
the staircase.




KEY:

1=HIT

(rest are undefined as of yet)



SPR - Changes the sprite offset of the Object
=====================================================


Example:

MAIN:
END

HIT:
SPR 3
END

When the object is hit, it will change its sprite to #3 in the 
sprite offset.  (I suggest using this only for nonmoving objects
at the moment)


