
// ========================= SCP_ZOFF script Risen3D v220 ================================
// Formatted for use with notepad
//
// LIGHTSCHEME, SETELEVSPEED, SETELEVSPEEDHEIGHT, SETPSEUDOFAKE   added in v220-31
//
// =======================================================================================

// It is better to just have one SCP_ZOFF lump in any one wad as all maps can have their
// own entries in the same SCP_ZOFF script. This is not mandatory, however.
//
// Script entries are map specific and are not shared across all maps in a wad.


// ================== KEYWORDS ====================

// The map id must first be inserted to identify which map the keywords following are to
// be used with (e.g. MAP01 or E1M1)
// Once matched the script will be read until another MAP num is encountered (or the end
// of the script is reached) so it must head the script used with that map.

// LIGHTSCHEME <integer n1> <integer n2> <integer n3>
//		torchlight   = n1 != 0
//		vtx lighting = n2 != 0 AND n1 == 0
//		sineCompress = n3 != 0
//
// NOTE: torchlight must be OFF in order to turn vtx lighting ON
//
// See also Things type 18000 and 18001 in the R3D_Docs\editing\R3D_types.txt



// For all the following keywords the first entry is always the Thing doomednum (or type).
// This is used to match the Thing placed in the map.

// ------------------ Keywords with Thing Types 16000 to 16899 --------------------------

// Must be placed precisely on top of the model's Thing and only used with models having
// fixed x, y.
// Where num is needed this can be any Thing other than 7700 TO 7999 or 16000 TO 17099

// num is the doom editing number (i.e. as used by map editors)

// SETDEF <16000 to 16899> <num> <lightlevel 0 - 255> <z-offset mapunits>
//  Num can be any Thing other than 16000 TO 16999 OR 7700 TO 7999
//  If lightlevel == 0 then sector light will be used
//  All offsets should be from the sector's floor or in the case of
//  3D lifts the containing sector's floor.
//  If wanting a Thing to be spawned under rather than on a same sector sided
//  line where its x, y points are on such a line then use a value of -32000.
//  If wanting a Thing to be spawned on the sector's floor under any 3D lifts or lines then
//  use a value of -32000.


// SETDEFDLI <16000 to 16899> <num> <lightlevel 0 - 255> <z-offset mapunits> <intensity 0.1 to 0.99f>
//  If lightlevel == 0 then sector light will be used
//  Intensity is used to scale the value of any incident dynlight (DLI Dynamic Light Intensity)


// SETOFFSET5 <16000 to 16899>
//	Apply a virtual distance offset of 5 away from the player's position when running the map.
//	Used for sorting purposes when rendering.  Does not change the actual position.


// ------------------ Keywords with Thing Types 16900 to 16999 --------------------------

// Must be placed precisely on the required line

// SETLINESOUND <16900 to 16999> <SOUNDID>
//  Note: all bullets will be blocked unless the line's special is set to
//        8093 in which case all the line will do is play the sound when used.
//        This special assumes that lines behind will always block

// If a 169xx Thing's line has the special 8140 then it will play once when crossed
// by the player. Using 8141 will mean it can be played again.

// SETLINESOUNDBV <16900 to 16999> <SOUNDID> <bv range 1 to 100>
//	if bv = 1 then 99% of all bullets are blocked
//	if bv = 100 then all bullets will pass


// The following are limited to four entries and should only be used with unscripted maps.

// If more than four are defined then actions could become unpredictable
// unless the map is designed specifically to take this limit into account.

// SETLINETRIGGERSOUND <16900 to 16999> <SOUNDID> <0 = play once 1 = play continuously>
// The thing must be placed on a line with a use type trigger.
// This ties the triggering of an action to starting the line sound.

// SETLINESOUNDOFF <16900 to 16999> <SOUNDID>
// The thing can be placed on any line type.
// Used to stop a sound set to play continuously.
// Once stopped it can only be restarted with a SETLINETRIGGERSOUND def.
// NOTE: this works for any sound so should be used with caution as no checks
//       are made that the sound was set using SETLINETRIGGERSOUND or that the
//       sound is a continuous type.


// ------------------ Keywords with Thing Types 17000 to 17099 --------------------------

// These can be used in both scripted and unscripted maps.

// SETELEVSPEED <17000 to 17099> <speed>
//	Place the Thing in the elevator's sector but not on a line.
//	speed is a floating point number in the range 0.1 to 6.0
//	(where 0.1 is the slowest speed).

// SETELEVSPEEDHEIGHT <17000 to 17099> <speed> <height> <tag> <n-up> <n-down>
//      Allows a group of tagged sectors to all be raised or lowered by the same 'height'
//	'speed' is a floating point number in the range 0.1 to 6.0
//	'height' is in map units and is the amount to be applied on each raise or lower
//               to be applied relative to the height set at the start in a map.
//	'n-up' is a +ve integer setting the number of times an up trigger will be allowed.
//	'n-down' is a +ve integer setting the number of times a down trigger will be allowed.
//	In both cases once a floor has reached its limit triggering will be ignored for the
//	respective limit.
//	n-up and n-down must be in the range 0 to 128
//
//	Applying n-up must not cause a tagged sector's floor to exceed its ceiling height.
//	Applying n_down must not cause a tagged sector's floor go lower than -32767 map units.
//
//	Values sent are checked when loaded and any exceeding the map limits will cause
//	an exit with an error report.
//
//	Example 1. Let us say that the group can only go from the current position to
//	+height then values of 1 and 0 would be used. This would still be true if only
//	wanting it to go up and then stay put as, in this case, an S1 up trigger would
//	be used with no down trigger in the map. Here the down value will not actually
//	be used but a valid number must still be entered.
//
//	Example 2. Let us say that 2 up triggers are wanted and one down which will mean
//	the group being able to be triggered to go to 2xheight and -height then the
//      values of 2 and 1 would be used. Thus in all cases the numbers are relative to
//	the starting height in the map.
//
//	NOTE: This can only be activated using specials 227 to 234.
//	The checks ensure that the relative heights always remain in sync both to each
//	other and to the starting height.

// SETPSEUDOFAKE <17000 to 17099> <tag> <damage> <filter>
//     Set tagged sectors to adopt a fake floor/ceiling using the parms of a reference
/      sector the Thing resides in. There is no secondary faked ceiling and the reference
//     sector's ceiling height is best set to > than the height of any sector's that are
//     referenced. In order to help with editing a line in the reference sector can be
//     set to the tagged sectors' value but retaining a special value of 0. Unlike the
//     standard fake spec a separate reference sector is not needed for all sector's
//     referenced. The only requirement is that they all need the same fake floor height.
//
//     This is also useful where all the tagged sectors require waterdynamics but where
//     not wanting their floor flats to be replaced. In addition moving plats can be put
//     in these sectors.
//
//     Damage should be set to 0-no damage or 1-where a fixed damage of 20, if the players'
//     head is below the faked floor, will be applied.


//  END
//  The keyword END can be used to terminate the script but is not mandatory.

// SCRIPT -------------------------------------------------------------------------------

