LunaDLL Autocode Reference

From PGE Wiki
Jump to navigation Jump to search
WARNING: Autocode is OUTDATED!!!
Autocode is Outdated, NEVER use it!! Use LunaLua instead!!

Basic Filters

Details
Command Target Param Param Param Active time String Description
FilterToSmall x x x x Length x Player loses all powerups.
FilterToBig x x x x Length x Player loses all powerups higher than bigness.
FilterToFire x x x x Length x Player loses all powerups higher than fireballs.
FilterMount x x x x Length x Whatever the player is riding disappears.
FilterReservePowerup x x x x Length x The player's reserve powerup disappears.
FilterPlayer x Filter ID To ID x Length x If the player's character type is "Filter ID", they change to the character set in "To ID".

General Effect Commands

Details
Command Target Param Param Param Active time String Description
HeartSystem Display X Display Y Max hearts x Length x Activates a heart tracking system for players that use hearts. Allows for more than 3 hearts and displays the current heart count at X / Y on screen.
InfiniteFlying x x x x Length x Player's flight timer never decreases below 50 so long as this event is active.
ForceFacing NPC ID Section x x Length x All NPCs of NPC ID in Section always face the player.

Screen commands

Details
Command Target Param Param Param Active time String Description
PushScreenBoundary Section UDLR x x Length Speed Moves section borders.
ScreenEdgeBuffer NPC ID UDLR Buffer Space x Length x Keeps NPCs from leaving the screen.

Text commands

Details
Command Target Param Param Param Active time String Description
ClearInputString x x x x Length x Interrupts words and cheats the player is typing.
ShowText x X pos Y pos Font type Length String Shows String on the screen, at coordinates Xpos and Y pos, with specified font type.
ShowNPCLifeLeft NPC ID X pos Y pos Section Length Base health Displays how much life the first match for "NPC ID" in "Section" has. Displays on the screen at coordinates X pos and Y pos. Supply the correct base health for the NPC so it can calculate the correct remaining life.

Triggers

Details
Command Target Param Param Param Active time String Description
Timer Target Effect Display? Reset? Length x Starts a timer that performs Effect on Target. Set "Display?" to 1 to display the timer in the top right. Set "Reset" to 1 and the timer will start over once it completes. If "Effect" is 1000 or higher, the timer will behave like the Trigger command. It will trigger the corresponding custom event by placing it in the section specified by Target.
Trigger Event x x x x x Activates an event by moving "Event" to "New section". The trigger itself expires afterwards.
TriggerRandom Possible event 1 Possible event 2 Possible event 3 Possible event 4 Length x Triggers one of the 4 events at random.
TriggerRandomRange Start End x x Length x Triggers one of the events between two other events.
TriggerSMBXEvent x x x x x Event Name Triggers SMBX event with Event Name.
TriggerZone Event to trigger Top edge Bottom edge edge Left edge Right edge Options Triggers EVENT when the player enters the rectangle created by the 4 bounds.
IfNPC NPC ID Condition To section Event Length x If "Condition" is true for NPC specified by "NPC ID", then custom event "Event" is triggered in "To section". IfNPC command expires itself after triggering.
IfVar x Comparison Value Event Length Variable Name Check permanent Variable and activate Event if Comparison is true
OnInput x Button First frame? Event to trigger Length x Activates EVENT when BUTTON is pressed. If TAPPED is set, it only activates the first frame that the player pressed the button and won't again until they let go and press again.
OnCustomCheat x x Only once? Event to trigger Length Type (b, w, dw, f, df) When the player types CHEAT STRING, activate EVENT.
OnPlayerMem Offset Value Comparison type Event to trigger Length Type (b, w, dw, f, df) Scans player memory and checks OFFSET. Does COMPARISON to the VALUE at that OFFSET, and if the comparison is true, it activates EVENT. DATA SIZE is what type of data it should look for at that offset.
OnGlobalMem Address Value Comparison type Event to trigger Length Type (b, w, dw, f, df) Scans SMBX global memory at ADDRESS. Does COMPARISON to the VALUE at that ADDRESS, and if the compaison is true, it activates EVENT. DATA SIZE is what type of data it should look for at that offset.
BlockTrigger Who can trigger Block type Collision type Event to trigger Length Options When player touches any block of type BLOCK ID, activates EVENT. URDL determines what type of interaction the player must have with the block.

Layer commands

Details
Command Target Param Param Param Active time String Description
LayerXSpeed Layer # Stop after? x x Length New speed Sets the X (left and right) speed of LAYER NUMBER to SPEED.
LayerYSpeed Layer # Stop after? x x Length New speed Sets the Y (up and down) speed of LAYER NUMBER to SPEED.
AccelerateLayerX Layer # Max speed x x Length Accel amt Increases the X speed of a layer, up to MAX SPEED. Adds by SPEED every frame.
AccelerateLayerY Layer # Max speed x x Length Accel amt Increases the Y speed of a layer, up to MAX SPEED. Adds by SPEED every frame.
DeccelerateLayerX Layer # Deccelerate to x x Length Accel amt Puts a friction or air resistance-like decceleration on a layer. The layer's speed will decrease by SPEED every frame, to a minimum of DECCEL TO.
DeccelerateLayerY Layer # Deccelerate to x x Length Accel amt Puts a friction or air resistance-like decceleration on a layer. The layer's speed will decrease by SPEED every frame, to a minimum of DECCEL TO.

Set commands

Details
Command Target Param Param Param Active time String Description
CyclePlayerLeft x x x x Length x Cycles player character 'left'.
CyclePlayerRight x x x x Length x Cycles player character 'right'.
DeleteEventsFrom Section x x x Length x Delete all commands marked with the given Section.
Kill Target x x x Length Option Kills the target.
MemAssign Address Value Operation x Length Data type Sets the internal memory of SMBX.
NPCMemSet NPC ID Offset Value OPERATION Length Data type Sets the memory of all NPCs in the level of the given type.
PlayerMemSet x Offset Value OPERATION Length Data type Sets the memory of Player 1.
SetHearts x Hearts x x Length x Sets the amount of hearts the player currently has to HEARTS.
SetHits NPC ID Section Damage x Length x Set all NPCs that have the given NPCID to have taken HITS amount of hits.
SetVar x Operation Value x Length Variable Name Manipulates permanent user variables

Audio commands

Details
Command Target Param Param Param Active time String Description
SFX x Sound ID x x Delay x Plays SOUND EFFECT after DELAY. Set DELAY of 1 for instant playback. Can play a custom sound effect from the level folder if you specify FILENAME.
PlayMusic x Section x x Delay x Plays the music from SECTION after DELAY. Set DELAY to 1 to play it right now.

Advanced/Misc commands

Details
Command Target Param Param Param Active time String Description
DebugPrint x x x x Length x Write some info about how lunadll is running onto the screen.
LunaControl Type Action x x Length x Performs Action on Type
ModParam Param to modify Value Operation Section Length Identifier Changes command somewhere else in the script.