LunaLua constants

From PGE Wiki
Jump to: navigation, search
Constants
Constant Used in Description
GAME_ENGINE --- Equal to "LunaLUA" string (since v0.7.2). If this script will be ran on PGE Engine, it will be equal to "PGE_Engine". Use this constant to make cross-engine scripts which would be used with both PGE-Lua and LunaLUA
LUNALUA_VER --- Contains current version of LunaLUA (since v0.7.2)
player --- The first player.
player2 --- The second player. Is only constructed if the level runs in two player mode.
FIND_ANY findnpcs Is used to skip one of the filter.
DIR_RIGHT NPC.direction Represents the direction right.
DIR_RANDOM NPC.direction Represents the direction random.
DIR_LEFT NPC.direction Represents the direction left.
PLAYER_SMALL Player.powerup
PlayerSettings.get
No powerup/Small
PLAYER_BIG Player.powerup
PlayerSettings.get
Mushroom powerup/Big
PLAYER_FIREFLOWER Player.powerup
PlayerSettings.get
Fireflower powerup
PLAYER_LEAF Player.powerup
PlayerSettings.get
Leaf powerup
PLAYER_TANOOKIE Player.powerup
PlayerSettings.get
Tanookie powerup
PLAYER_HAMMER Player.powerup
PlayerSettings.get
Hammer powerup
PLAYER_ICE Player.powerup
PlayerSettings.get
Ice powerup
CHARACTER_MARIO PlayerSettings.get Mario/Demo character
CHARACTER_LUIGI PlayerSettings.get Luigi/Iris character
CHARACTER_PEACH PlayerSettings.get Peach/Kood character
CHARACTER_TOAD PlayerSettings.get Toad/Raocow character
CHARACTER_LINK PlayerSettings.get Link/Sheath character
HARM_TYPE_JUMP NPC:harm Damage dealt by player jumps
HARM_TYPE_FROMBELOW NPC:harm Damage dealt by block bumps from below
HARM_TYPE_NPC NPC:harm Damage dealt by a thrown npc or bomb explosion
HARM_TYPE_PROJECTILE_USED NPC:harm Damage dealt to projectiles like fireballs, etc. when they hit something
HARM_TYPE_LAVA NPC:harm Damage dealt by contact with lava
HARM_TYPE_HELD NPC:harm Damage dealt by an npc held by the player
HARM_TYPE_TAIL NPC:harm Damage dealt by the player's tail
HARM_TYPE_SPINJUMP NPC:harm Damage dealt by player spin jumps
HARM_TYPE_OFFSCREEN NPC:harm Damage dealt when an npc is despawned
HARM_TYPE_SWORD NPC:harm Damage dealt by Link's sword
HARM_TYPE_EXT_FIRE NPC:harm Damage dealt by player-thrown fireballs
HARM_TYPE_EXT_ICE NPC:harm Damage dealt by player-thrown iceballs
HARM_TYPE_EXT_HAMMER NPC:harm Damage dealt by player-thrown hammers
FIELD_BYTE mem
Player:mem
NPC:mem
Byte field (1 byte field representing an integer)
FIELD_WORD mem
Player:mem
NPC:mem
Word field (2 byte field representing an integer)
FIELD_DWORD mem
Player:mem
NPC:mem
DWord field (4 byte field representing an integer)
FIELD_FLOAT mem
Player:mem
NPC:mem
Float field (4 byte field representing a decimal value)
FIELD_DFLOAT mem
Player:mem
NPC:mem
DFloat field aka. Double field (8 byte field representing a decimal value)
FIELD_STRING mem
Player:mem
NPC:mem
String field (VBStr)
KEY_UP keycode Up key
KEY_DOWN keycode Down key
KEY_LEFT keycode Left key
KEY_RIGHT keycode Right key
KEY_JUMP keycode Jump key
KEY_SPINJUMP keycode Spinjump key
KEY_X keycode X key
KEY_RUN keycode Run key
KEY_SEL keycode Sel key
KEY_STR keycode Str key
isOverworld --- True, if the script is run on the overworld