It depends on what the thing is in question. The LunaLua Animation class is for particle effects and the cinematX animation functionality lets you give NPCs state-based animation like you see on Uncle Broadsword and Calleoca in my dev videos. That may not be what you're looking for.Zyglrox Odyssey wrote:So I'd like to cycle through an unspecified number of layers being visible and ideally have them animate upon becoming visible. Kinda like yoku blocks only definitely not actually yoku blocks.
From what I've gathered I can have each set of cycling layers in a different section and have the events only run in those sections with lunadll, but is it at all possible to stop them cycling within the same section?
Also am I correct in believing none of the lunastuff can animate a thing itself? I haven't looked into cinematX too thoroughly, but if I'm understanding correctly lua's Animation class is not at all the thing I'm looking for and dll can't do anything even resembling what I'm after.
cinematX does, however, use coroutines, which would allow you to run code like this:
Code: Select all
triggerEvent ("Yoku step 1")
waitSeconds (1.2)
triggerEvent ("Yoku step 2")
waitSeconds (1.2)
etc...
LunaLua has onLoopSection_() and onLoadSection_() events and the trigger SMBX event function above. LunaLua has a Layer class but it's is somewhat limited at the moment, so you'd be better off hiding and showing layers manually via SMBX events. You could also animate blocks by using findblocks () to create an array of blocks with a certain ID and then changing those blocks' ids at regular intervals.
Sometimes the SMBX editor won't detect a song until you close it and re-open it, though if that doesn't help (assuming you're using Windows) you may want to check your Folder Options to make sure your file doesn't have the extension hidden -- it could be named something like "filename.mp3.mp3" and that may be throwing SMBX off.arabsalmon wrote:Is there something I am doing wrong with the custom music? I have my mp3 in my level folder, and I am typing its name exactly as it appears into the editor where it asks for a filename for custom music. And yet it refuses to play.
My level seems to ignore anything but custom graphics. It doesn't find custom music, and it ignores any kind of LunaDLL txt files as well, even though I am certain everything is where it should be.
As for the code, make sure your local LunaLua scripts are named "lunadll.lua" and your autocode files are named "lunadll.txt".