Module Game

Donxon Game module.

This module contains the functionality for scripts running on the server.

It can be used in script files registered in the "game" array of project.json.

Data Structures

.netMessageShowMenuParameter The Common.NetMessage.TYPE.SHOWMENU parameters.
.netMessageScreenFadeParameter The Common.NetMessage.TYPE.SCREENFADE parameters.
.netMessageBarTimeParameter The Common.NetMessage.TYPE.BARTIME parameters.
.netMessageBarTime2Parameter The Common.NetMessage.TYPE.BARTIME2 parameters.
.netMessageTETextMessageParameter The Common.NetMessage.TYPE.TE_TEXTMESSAGE parameters.

Functions

GetDeltaTime () Gets the delta time.

Tables

MONSTERTYPE List of spawnable monsters.
RENDERFX Render FX modes (entvars_t::renderfx).

Classes

NetMessage Network Message Sender class.
TextMenu Game Text Menu class.
ScreenFade Game Screen Fade class.
BarTime Game BarTime class.


Data Structures

.netMessageShowMenuParameter
The Common.NetMessage.TYPE.SHOWMENU parameters.
  • KeysBitSum short
  • Time char
  • Multipart byte
  • Text string
.netMessageScreenFadeParameter
The Common.NetMessage.TYPE.SCREENFADE parameters.

Note: Duration and HoldTime are in special units.

If FFADE_LONGFADE flag is set, 1 second is equal to (1<<8) i.e. 256 units. Otherwise, 1 second is equal to (1<<12) i.e. 4096 units.

  • Duration short
  • HoldTime short Sets to 0 to remove the screenfade.
  • Flags short
  • ColorR byte
  • ColorG byte
  • ColorB byte
  • Alpha byte
.netMessageBarTimeParameter
The Common.NetMessage.TYPE.BARTIME parameters.
  • Duration short Sets to 0 to hide the bar.
.netMessageBarTime2Parameter
The Common.NetMessage.TYPE.BARTIME2 parameters.

Note: Display time can be calculated with this formula: (1 - (StartPercent / 100)) / Duration

  • Duration short Sets to 0 to hide the bar.
  • StartPercent short
.netMessageTETextMessageParameter
The Common.NetMessage.TYPE.TE_TEXTMESSAGE parameters.

Note: Channel, X, Y, FadeInTime, FadeOutTime, HoldTime and FXTime are in special units.

Channel -> Must be assigned with operator AND 0xFF (Channel & 0xFF).

X, Y -> 1 unit is equal to (1<<13) i.e. 8192 units.

FadeInTime, FadeOutTime, HoldTime and FXTime -> 1 second is equal to (1<<8) i.e. 256 units.

  • Channel byte (Range = 1~Common.HUDText.maxChannel)(0 = auto, overwrites next iteration if full).
  • X short (Range = 0~1.0)(-1.0 = centered).
  • Y short (Range = 0~1.0)(-1.0 = centered).
  • Effect byte
  • TextColorR byte
  • TextColorG byte
  • TextColorB byte
  • TextAlpha byte
  • EffectColorR byte
  • EffectColorG byte
  • EffectColorB byte
  • EffectAlpha byte
  • FadeInTime short
  • FadeOutTime short
  • HoldTime short
  • EffectTime short Time the highlight lags behing the leading text in scan-out effect. (optional)
  • Text string

Functions

GetDeltaTime ()
Gets the delta time.

Returns:

    number The delta time.

Tables

MONSTERTYPE
List of spawnable monsters.

Fields:

  • NONE None.
  • NORMAL0 Normal Zombie (Level 0).
  • NORMAL1 Normal Zombie (Level 1).
  • NORMAL2 Normal Zombie (Level 2).
  • NORMAL3 Normal Zombie (Level 3).
  • NORMAL4 Normal Zombie (Level 4).
  • NORMAL5 Normal Zombie (Level 5).
  • NORMAL6 Normal Zombie (Level 6).
  • RUNNER0 Runner Zombie (Level 0).
  • RUNNER1 Runner Zombie (Level 1).
  • RUNNER2 Runner Zombie (Level 2).
  • RUNNER3 Runner Zombie (Level 3).
  • RUNNER4 Runner Zombie (Level 4).
  • RUNNER5 Runner Zombie (Level 5).
  • RUNNER6 Runner Zombie (Level 6).
  • HEAVY1 Armored Zombie (Level 1).
  • HEAVY2 Armored Zombie (Level 2).
  • GHOST Cloth Ghost (Halloween).
  • PUMPKIN Pumpkin-headed Scarecrow (Halloween).
  • PUMPKINHEAD Pumpkin Head (Halloween).
  • A101AR A101AR (Assault Rifle).
  • A104RL A104RL (Rocket Launcher).
  • MUSHROOM1 Orange Mushroom (Maple).
  • MUSHROOM2 Trail Mushroom (Maple).
  • MUSHROOM3 Horny Mushroom (Maple).
  • SLIME1 Crown Slime (Maple).
  • SLIME2 Slime (Maple).
  • CHINA1 Yellow Turban Soldier (China).
  • CHINA2 Yellow Turban General (China).
  • SNOWMAN Snowman (Xmas).
  • MINION1 Red Minion (Space).
  • MINION2 Blue Minion (Space).
  • HOOLIGAN1 Hooligan A (Melee) (Soccer).
  • HOOLIGAN2 Hooligan B (Can Thrower) (Soccer).
  • PROTOPHOBOS Phobos Prototype (Boss).
  • GASTOWER Plague Turret (Shelter).
  • BOMBER Normal Zombie (Bomber) (Shelter).
  • BOOMER Runner Zombie (Self-destruct) (Shelter).
  • KINGDOM1 Runner Zombie (King) (Joseon Kingdom).
  • KINGDOM2 Runner Zombie (Level 1) (Male) (Joseon Kingdom).
  • KINGDOM3 Runner Zombie (Level 2) (Male) (Joseon Kingdom).
  • KINGDOM4 Runner Zombie (Level 3) (Female) (Joseon Kingdom).

See also:

RENDERFX
Render FX modes (entvars_t::renderfx).

Fields:

  • NONE No effect (default).
  • PULSESLOW
  • PULSEFAST
  • PULSESLOWWIDE
  • PULSEFASTWIDE
  • FADESLOW
  • FADEFAST
  • SOLIDSLOW
  • SOLIDFAST
  • STROBESLOW
  • STROBEFAST
  • STROBEFASTER
  • FLICKERSLOW
  • FLICKERFAST
  • NODISSIPATION
  • DISTORT Distort/scale/translate flicker.
  • HOLOGRAM kRenderFxDistort + distance fade.
  • DEADPLAYER kRenderAmt is the player index.
  • EXPLODE Scale up really big!
  • GLOWSHELL Glowing Shell.
  • CLAMPMINSCALE Keep this sprite from getting very small (SPRITES only!).
  • LIGHTMULTIPLIER CTM !!!CZERO added to tell the studiorender that the value in iuser2 is a lightmultiplier.

See also:

Classes

NetMessage
Network Message Sender class.

To sends messages to clients.

TextMenu
Game Text Menu class.

Main class. To builds and displays text menus.

ScreenFade
Game Screen Fade class.

Main class. To fades the player's screen.

BarTime
Game BarTime class.

Main class. To displays progress bar similar to C4 planting/defusing progress bar.

generated by LDoc 1.4.6 Last updated 2020-06-15 21:15:36