LunaDLL Autocode Reference

From Moondust Wiki
Revision as of 09:25, 13 October 2014 by Kevsoft (talk | contribs) (small fix)
Jump to navigation Jump to search

Commands

Basic filters
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
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.


Text commands
Command Target Param Param Param Active time String Description
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.


Basic filters
Command Target Param Param Param Active time String Description
Trigger Event x x x x x Activates an event by moving "Event" to "New section". The trigger itself expires afterwards.
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.
TriggerRandom Possible event 1 Possible event 2 Possible event 3 Possible event 4 Length x Triggers one of the 4 events at random.
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.
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
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.


Audio commands
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.