qzdoom-gpl/wadsrc/static/zscript/shared/sectoraction.txt
Christoph Oelckers cf39af0642 - consolidated the sector action classes.
This can be done with a lot less overhead by using one of the object's properties to store the activation flag, so that all the nearly redundant trigger methods can be folded into one.
2017-01-13 01:06:37 +01:00

144 lines
2.3 KiB
Text

class SectorAction : Actor native
{
// this class uses health to define the activation type.
enum EActivation
{
SECSPAC_Enter = 1,
SECSPAC_Exit = 2,
SECSPAC_HitFloor = 4,
SECSPAC_HitCeiling = 8,
SECSPAC_Use = 16,
SECSPAC_UseWall = 32,
SECSPAC_EyesDive = 64,
SECSPAC_EyesSurface = 128,
SECSPAC_EyesBelowC = 256,
SECSPAC_EyesAboveC = 512,
SECSPAC_HitFakeFloor= 1024,
};
default
{
+NOBLOCKMAP
+NOSECTOR
+NOGRAVITY
+DONTSPLASH
}
}
// Triggered when entering sector -------------------------------------------
class SecActEnter : SectorAction
{
Default
{
Health SECSPAC_Enter;
}
}
// Triggered when leaving sector --------------------------------------------
class SecActExit : SectorAction
{
Default
{
Health SECSPAC_Exit;
}
}
// Triggered when hitting sector's floor ------------------------------------
class SecActHitFloor : SectorAction
{
Default
{
Health SECSPAC_HitFloor;
}
}
// Triggered when hitting sector's ceiling ----------------------------------
class SecActHitCeil : SectorAction
{
Default
{
Health SECSPAC_HitCeiling;
}
}
// Triggered when using inside sector ---------------------------------------
class SecActUse : SectorAction
{
Default
{
Health SECSPAC_Use;
}
}
// Triggered when using a sector's wall -------------------------------------
class SecActUseWall : SectorAction
{
Default
{
Health SECSPAC_UseWall;
}
}
// Triggered when eyes go below fake floor ----------------------------------
class SecActEyesDive : SectorAction
{
Default
{
Health SECSPAC_EyesDive;
}
}
// Triggered when eyes go above fake floor ----------------------------------
class SecActEyesSurface : SectorAction
{
Default
{
Health SECSPAC_EyesSurface;
}
}
// Triggered when eyes go below fake ceiling ----------------------------------
class SecActEyesBelowC : SectorAction
{
Default
{
Health SECSPAC_EyesBelowC;
}
}
// Triggered when eyes go above fake ceiling ----------------------------------
class SecActEyesAboveC : SectorAction
{
Default
{
Health SECSPAC_EyesAboveC;
}
}
// Triggered when hitting fake floor ----------------------------------
class SecActHitFakeFloor : SectorAction
{
Default
{
Health SECSPAC_HitFakeFloor;
}
}
// Music changer ----------------------------------
class MusicChanger : SectorAction native
{
}