PGE-Lua Constants

From Moondust Wiki
Revision as of 09:02, 2 November 2015 by Wohlstand (talk | contribs) (Created page with "Category:LunaLua API {{Constant Table|Constants||2= {{API table/row|GAME_ENGINE|---|Equal to "<u>PGE_Engine</u>" string. If this script will be ran on LunaLUA, it will be...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Constants
Constant Used in Description
GAME_ENGINE --- Equal to "PGE_Engine" string. If this script will be ran on LunaLUA, it will be equal to "LunaLUA". Use this constant to make cross-engine scripts which would be used with both PGE-Lua and LunaLUA
PGE_ENGINE_VER --- Contains current version of PGE Engine
GENERATOR_APPEAR --- Spawn NPC as simple appearance
GENERATOR_WARP --- Spawn NPC as warp appearance
GENERATOR_PROJECTILE --- Spawn NPC as projectile
SPAWN_LEFT --- Spawn NPC with throwing left (warp and projectile spawn)
SPAWN_RIGHT --- Spawn NPC with throwing right (warp and projectile spawn)
SPAWN_UP --- Spawn NPC with throwing up (warp and projectile spawn)
SPAWN_DOWN --- Spawn NPC with throwing down (warp and projectile spawn)
NPC_DAMAGE_NOREASON NPCBase Damage without reason (usually would be killed by lua script or by engine without game logic)
NPC_DAMAGE_STOMPED NPCBase Damage because playable character stomped this NPC
NPC_DAMAGE_BY_KICK NPCBase Damage because playable character thrown item to this NPC
NPC_DAMAGE_BY_PLAYER_ATTACK NPCBase Damage because playable character attacked NPC itself with sword, bet, knife or with fists
NPC_DAMAGE_TAKEN NPCBase If this NPC is a coin or special bonus, it will be killed because contacted with playable character
NPC_DAMAGE_CUSTOM_REASON NPCBase If value equal to NPC_DAMAGE_CUSTOM_REASON or has value larger than it, would be used custom damage reasons (NPC_DAMAGE_CUSTOM_REASON+1, NPC_DAMAGE_CUSTOM_REASON+2, NPC_DAMAGE_CUSTOM_REASON+3, etc.). Can be applied via lua code only
NPC_WARP_TOP NPCBase Top-sided NPC's sprite warp
NPC_WARP_LEFT NPCBase Left-sided NPC's sprite warp
NPC_WARP_BOTTOM NPCBase Bottom-sided NPC's sprite warp
NPC_WARP_RIGHT NPCBase Right-sided NPC's sprite warp