Built-in constants
Names for the numbers that commands use, so KeyDown(KEY_LEFT) can say what KeyDown(203) means. Use them anywhere a number goes; they never change.
If your program has its own Const, Global or variable with the same name as one of these, yours is used instead, so older programs keep working.
Keys
| Name | Value | Meaning |
|---|
KEY_ESCAPE | 1 | The Escape key |
KEY_1 | 2 | The 1 key |
KEY_2 | 3 | The 2 key |
KEY_3 | 4 | The 3 key |
KEY_4 | 5 | The 4 key |
KEY_5 | 6 | The 5 key |
KEY_6 | 7 | The 6 key |
KEY_7 | 8 | The 7 key |
KEY_8 | 9 | The 8 key |
KEY_9 | 10 | The 9 key |
KEY_0 | 11 | The 0 key |
KEY_MINUS | 12 | The - key |
KEY_EQUALS | 13 | The = key |
KEY_BACKSPACE | 14 | The Backspace key |
KEY_TAB | 15 | The Tab key |
KEY_Q | 16 | The Q key |
KEY_W | 17 | The W key |
KEY_E | 18 | The E key |
KEY_R | 19 | The R key |
KEY_T | 20 | The T key |
KEY_Y | 21 | The Y key |
KEY_U | 22 | The U key |
KEY_I | 23 | The I key |
KEY_O | 24 | The O key |
KEY_P | 25 | The P key |
KEY_LBRACKET | 26 | The [ key |
KEY_RBRACKET | 27 | The ] key |
KEY_ENTER | 28 | The Enter (Return) key |
KEY_LCTRL | 29 | The left Ctrl key |
KEY_A | 30 | The A key |
KEY_S | 31 | The S key |
KEY_D | 32 | The D key |
KEY_F | 33 | The F key |
KEY_G | 34 | The G key |
KEY_H | 35 | The H key |
KEY_J | 36 | The J key |
KEY_K | 37 | The K key |
KEY_L | 38 | The L key |
KEY_SEMICOLON | 39 | The ; key |
KEY_APOSTROPHE | 40 | The ' key |
KEY_GRAVE | 41 | The ` (backtick) key |
KEY_LSHIFT | 42 | The left Shift key |
KEY_BACKSLASH | 43 | The \ key |
KEY_Z | 44 | The Z key |
KEY_X | 45 | The X key |
KEY_C | 46 | The C key |
KEY_V | 47 | The V key |
KEY_B | 48 | The B key |
KEY_N | 49 | The N key |
KEY_M | 50 | The M key |
KEY_COMMA | 51 | The , key |
KEY_PERIOD | 52 | The . key |
KEY_SLASH | 53 | The / key |
KEY_RSHIFT | 54 | The right Shift key |
KEY_LALT | 56 | The left Alt key |
KEY_SPACE | 57 | The Space key |
KEY_CAPSLOCK | 58 | The Caps Lock key |
KEY_F1 | 59 | The F1 key |
KEY_F2 | 60 | The F2 key |
KEY_F3 | 61 | The F3 key |
KEY_F4 | 62 | The F4 key |
KEY_F5 | 63 | The F5 key |
KEY_F6 | 64 | The F6 key |
KEY_F7 | 65 | The F7 key |
KEY_F8 | 66 | The F8 key |
KEY_F9 | 67 | The F9 key |
KEY_F10 | 68 | The F10 key |
KEY_F11 | 87 | The F11 key |
KEY_F12 | 88 | The F12 key |
KEY_RCTRL | 157 | The right Ctrl key |
KEY_RALT | 184 | The right Alt key |
KEY_HOME | 199 | The Home key |
KEY_UP | 200 | The up arrow key |
KEY_PAGEUP | 201 | The Page Up key |
KEY_LEFT | 203 | The left arrow key |
KEY_RIGHT | 205 | The right arrow key |
KEY_END | 207 | The End key |
KEY_DOWN | 208 | The down arrow key |
KEY_PAGEDOWN | 209 | The Page Down key |
KEY_INSERT | 210 | The Insert key |
KEY_DELETE | 211 | The Delete key |
KEY_PAD0 | 82 | The keypad 0 key |
KEY_PAD1 | 79 | The keypad 1 key |
KEY_PAD2 | 80 | The keypad 2 key |
KEY_PAD3 | 81 | The keypad 3 key |
KEY_PAD4 | 75 | The keypad 4 key |
KEY_PAD5 | 76 | The keypad 5 key |
KEY_PAD6 | 77 | The keypad 6 key |
KEY_PAD7 | 71 | The keypad 7 key |
KEY_PAD8 | 72 | The keypad 8 key |
KEY_PAD9 | 73 | The keypad 9 key |
KEY_PADENTER | 156 | The keypad Enter key |
Mouse
| Name | Value | Meaning |
|---|
MOUSE_LEFT | 1 | The left mouse button, for MouseDown and MouseHit |
MOUSE_RIGHT | 2 | The right mouse button |
MOUSE_MIDDLE | 3 | The middle mouse button |
Lights and Cameras
| Name | Value | Meaning |
|---|
LIGHT_DIRECTIONAL | 1 | CreateLight: lights everything from one direction, like the sun |
LIGHT_POINT | 2 | CreateLight: shines in every direction from a point, like a bulb |
LIGHT_SPOT | 3 | CreateLight: shines in a cone, like a torch |
PROJ_NONE | 0 | CameraProjMode: the camera draws nothing |
PROJ_PERSPECTIVE | 1 | CameraProjMode: normal 3D, distant things look smaller |
PROJ_ORTHO | 2 | CameraProjMode: no perspective, things look the same size at any distance |
Animation
| Name | Value | Meaning |
|---|
ANIM_STOP | 0 | Animate: stops animating |
ANIM_LOOP | 1 | Animate: plays over and over |
ANIM_PINGPONG | 2 | Animate: plays forwards, then backwards, over and over |
ANIM_ONCE | 3 | Animate: plays once and stops |
Appearance
| Name | Value | Meaning |
|---|
BLEND_ALPHA | 1 | EntityBlend: normal see-through blending |
BLEND_MULTIPLY | 2 | EntityBlend: darkens what is behind |
BLEND_ADD | 3 | EntityBlend: brightens what is behind, for glows and fire |
FX_FULLBRIGHT | 1 | EntityFX: not affected by lights |
FX_VERTEXCOLOR | 2 | EntityFX: uses the mesh's vertex colours |
FX_NOFOG | 8 | EntityFX: not affected by fog |
FX_DOUBLESIDED | 16 | EntityFX: both sides of each triangle are drawn |
FX_FORCEALPHA | 32 | EntityFX: always drawn as see-through |
TEX_COLOR | 1 | LoadTexture flag: a colour texture |
TEX_ALPHA | 2 | LoadTexture flag: keeps the image's transparency |
TEX_MASKED | 4 | LoadTexture flag: black pixels are see-through |
TEX_MIPMAP | 8 | LoadTexture flag: smoother when seen from far away |
TEX_CLAMPU | 16 | LoadTexture flag: doesn't repeat across |
TEX_CLAMPV | 32 | LoadTexture flag: doesn't repeat down |
Collisions and Picking
| Name | Value | Meaning |
|---|
COLLIDE_SPHERE | 1 | Collisions method: sphere against sphere |
COLLIDE_POLYGON | 2 | Collisions method: sphere against the other entity's triangles |
COLLIDE_BOX | 3 | Collisions method: sphere against the other entity's box |
RESPONSE_STOP | 1 | Collisions response: stops dead |
RESPONSE_SLIDE | 2 | Collisions response: slides along what it hits |
RESPONSE_SLIDE_NOSLOPE | 3 | Collisions response: slides, but doesn't slide down slopes |
PICK_NONE | 0 | EntityPickMode: can't be picked |
PICK_SPHERE | 1 | EntityPickMode: picked by its sphere |
PICK_POLYGON | 2 | EntityPickMode: picked by its triangles |
PICK_BOX | 3 | EntityPickMode: picked by its box |
Physics