Re: Need help with lua? - LunaLua General Help
Posted: Sat May 14, 2016 6:27 pm
http://lua-users.org/wiki/StringsTutorialMECHDRAGON777 wrote:I should learn more about tables.
http://lua-users.org/wiki/TablesTutorial
Forums for SMBX
https://www.smbxgame.com/forums/
http://lua-users.org/wiki/StringsTutorialMECHDRAGON777 wrote:I should learn more about tables.
No. You can try playing one of the tracks through a sound channel, but sound tends to cut off and loading such a big sound effect can cause the game to hiccup for a second.HenryRichard wrote:Is there a way to use multi-channel music?
The error appears if you haven't got C++ configuration package. There should be file named something like vcredist.exe or something like that. Run it.NoodlesButt wrote:I downloaded LunaLua, full installation, vanilla+launcher but when I try to run the smbx application I get an application error.
"The application was unable to start correctly (0xc000007b). Click OK to close the application."
Oh, that simple.Mario_and_Luigi_55 wrote: The error appears if you haven't got C++ configuration package. There should be file named something like vcredist.exe or something like that. Run it.
http://wohlsoft.ru/pgewiki/SMBX_FieldsGhostly_Guy wrote:Is there a code you can use to trigger a cheat when you collect [npc]?
As in, can you make an item that, after you collect it, triggers supermario4 and then immediately --?
Sorry, but that didn't really work for me. I entered this as a test:PixelPest wrote:http://wohlsoft.ru/pgewiki/SMBX_FieldsGhostly_Guy wrote:Is there a code you can use to trigger a cheat when you collect [npc]?
As in, can you make an item that, after you collect it, triggers supermario4 and then immediately --?
I'm also working on an API for cheats that in the future will make this even simpler
Code: Select all
function onStart()
Defines.cheat_supermario4 = TRUE
Defines.player_hasCheated = FALSE
end
Not just that, but "TRUE" is not the same thing as "true". When programming, case matters.Enjl wrote:If it's not on the list you can't activate it. The hook just doesn't exist yet.
However, is there a way to activate cheats not on the list?Enjl wrote:If it's not on the list you can't activate it. The hook just doesn't exist yet.
Okay, that was absolutely my fault. I changed it.Hoeloe wrote:Not just that, but "TRUE" is not the same thing as "true". When programming, case matters.
You can useGhostly_Guy wrote:However, is there a way to activate cheats not on the list?Enjl wrote:If it's not on the list you can't activate it. The hook just doesn't exist yet.
Okay, that was absolutely my fault. I changed it.Hoeloe wrote:Not just that, but "TRUE" is not the same thing as "true". When programming, case matters.
Code: Select all
Misc.cheatBuffer("moneytree"); -- example cheat
Code: Select all
Misc.cheatBuffer("myCheat1");
Misc.cheatBuffer("myCheat2");
Wait. Is event referring to, like, function onTick(), function onLoop(), etc.?! If so nm my questionHenryRichard wrote:It should be in the function's arguments.
the event refers to the thing that's happening in SMBX, i.e. an enemy being killed. But you can only get them in a few LunaLua events, like onNPCKill and onEventDirect. (At least, I'm pretty sure that's how it works)PixelPest wrote:Wait. Is event referring to, like, function onTick(), function onLoop(), etc.?! If so nm my questionHenryRichard wrote:It should be in the function's arguments.
Oh. That makes sense. ThanksEnjl wrote:eventObj in the arguments for onNPCKill and onEventDirect refers to the killing of the NPC and execution of the event respectively. They're cancellable through lua with eventObj.cancelled = true