LunaDLL/LunaLUA help thread
- FrozenQuills
- hehe haha 2024
- Posts: 843
- Joined: 9 years ago
- Location: my skull
Re: LunaDLL/LunaLUA help thread
Is there any way to disable the Grinder's (npc-179) tick sound?
Also is there a way to draw an image like a background object (like it goes behind blocks)?
Also this is likely unrelated to lua but what npcs are considered "background npcs" like in this image, and can those be configured?
Also is there a way to draw an image like a background object (like it goes behind blocks)?
Also this is likely unrelated to lua but what npcs are considered "background npcs" like in this image, and can those be configured?
avatar by crayonchewer!
Re: LunaDLL/LunaLUA help thread
Maybe throught sounds.ini and replace it with an slient sound? If you need the sound otherwise, then I need to find something else.FrozenQuills wrote:Is there any way to disable the Grinder's (npc-179) tick sound?
Nope, Render Priority is currently on active for custom images and custom text.FrozenQuills wrote:Also is there a way to draw an image like a background object (like it goes behind blocks)?
Can't say a lot about this but maybe this link helps futher: http://engine.wohlnet.ru/pgewiki/SMBX64 ... cters_listFrozenQuills wrote:Also this is likely unrelated to lua but what npcs are considered "background npcs" like in this image, and can those be configured?
- FrozenQuills
- hehe haha 2024
- Posts: 843
- Joined: 9 years ago
- Location: my skull
Re: LunaDLL/LunaLUA help thread
Ah I see.
Thanks though, replacing the tick sound with silence worked!
Thanks though, replacing the tick sound with silence worked!
avatar by crayonchewer!
- SAJewers
- ASMBXT Level Wrangler/A2XT Project Coordinator /AAT Level Designer
- Posts: 4219
- Joined: 12 years ago
- Location: Nova Scotia
Re: LunaDLL/LunaLUA help thread
Code: Select all
for k,v in pairs(NPC.get(38, -1)) do
if (v.ai1 == 0) then
v.ai1 = 1
end
end
Re: LunaDLL/LunaLUA help thread
Seems like this ai-field gets overwritten...SAJewers wrote:Any idea why this doesn't work/seem to do anything?Code: Select all
for k,v in pairs(NPC.get(38, -1)) do if (v.ai1 == 0) then v.ai1 = 1 end end
- Karatekid5
- Welcome to the resort!
- Posts: 78
- Joined: 14 years ago
- Location: Pennsylvania
- Contact:
Re: LunaDLL/LunaLUA help thread
I tried out that code, SMBX crashed with the same exception code (0xc0000005).Kevsoft wrote:Try with:Code: Select all
local overlay = Graphics.loadImage(Misc.resolveFile("HUB/Olimar.png")); function onLoop() if (player.x > -119306 and player.x < -119262 and player.y > -119974 and player.y <-119682) then Text.print("Olimaaaaaar",12,12) Graphics.placeSprite(1, overlay, 100, 100) end end
-
- Posts: 117
- Joined: 9 years ago
Re: LunaDLL/LunaLUA help thread
Is the image actually called HUB/Olimar.png?Karatekid5 wrote:I tried out that code, SMBX crashed with the same exception code (0xc0000005).Kevsoft wrote:Try with:Code: Select all
local overlay = Graphics.loadImage(Misc.resolveFile("HUB/Olimar.png")); function onLoop() if (player.x > -119306 and player.x < -119262 and player.y > -119974 and player.y <-119682) then Text.print("Olimaaaaaar",12,12) Graphics.placeSprite(1, overlay, 100, 100) end end
- Karatekid5
- Welcome to the resort!
- Posts: 78
- Joined: 14 years ago
- Location: Pennsylvania
- Contact:
Re: LunaDLL/LunaLUA help thread
Ah, it was named "olimar.png" instead of "Olimar.png". I didn't realize it was case sensitive ^^; . The code works now, and thank you for helping me out!
Re: LunaDLL/LunaLUA help thread
how would I go about changing the sounds for my level? I don't want the atmosphere of my level to be ruined by the cheery death tone.
here's mine
here's mine
Re: LunaDLL/LunaLUA help thread
You can use sounds.ini in the custom level folder to deactivate it.
See here: http://engine.wohlnet.ru/pgewiki/Game_C ... sounds.ini
See here: http://engine.wohlnet.ru/pgewiki/Game_C ... sounds.ini
- Wohlstand
- Moondust and TheXTech developer
- Posts: 186
- Joined: 10 years ago
- First name: Vitaly
- Pronouns: he/him/his
- Location: Moscow, Russia
Re: LunaDLL/LunaLUA help thread
You also forgot to plug actual SMBX sound-ID List: http://engine.wohlnet.ru/pgewiki/SFX_list_%28SMBX64%29Kevsoft wrote:You can use sounds.ini in the custom level folder to deactivate it.
See here: http://engine.wohlnet.ru/pgewiki/Game_C ... sounds.ini
That will help to declare RIGHT sounds. Example of alone sound declare (Player death sound-ID is 8)
Code: Select all
[sound-8]
name="Playere died"
file="oh-no_i_died.ogg"
Re: LunaDLL/LunaLUA help thread
Okay you know how if you type shadowstar/ghostytime the player turns completely black? Is there a way to toggle that blackness on/off without also getting the effects of the cheat?
Re: LunaDLL/LunaLUA help thread
Not right now... or you have to check the memory fields of the player.
Re: LunaDLL/LunaLUA help thread
Dang. I'll try and see if I can find it in there. I remember I figured something out with this before but I can't find the level, haha.
Re: LunaDLL/LunaLUA help thread
I believe setting the memory address 00B2C8AA to something higher than 0 turns the player sprite black. I don't know if it has any of the other effects from the cheat, though.
Re: LunaDLL/LunaLUA help thread
It works! And the other effects don't happen, either!kitikami wrote:I believe setting the memory address 00B2C8AA to something higher than 0 turns the player sprite black. I don't know if it has any of the other effects from the cheat, though.
!!!
Re: LunaDLL/LunaLUA help thread
Are you sure? Because when looking at my memory map I see that it directly points to the cheat-value. I might be mistaken.Holy wrote:It works! And the other effects don't happen, either!kitikami wrote:I believe setting the memory address 00B2C8AA to something higher than 0 turns the player sprite black. I don't know if it has any of the other effects from the cheat, though.
!!!
Re: LunaDLL/LunaLUA help thread
LunaLua v0.7.2.2 has been released with following changes:
Re: LunaDLL/LunaLUA help thread
Yeah, and if you're constantly setting it to 1 like I am the cheat won't even work. I don't actually know how weird that is, but it seems WEIRDKevsoft wrote:Are you sure? Because when looking at my memory map I see that it directly points to the cheat-value. I might be mistaken.Holy wrote:It works! And the other effects don't happen, either!kitikami wrote:I believe setting the memory address 00B2C8AA to something higher than 0 turns the player sprite black. I don't know if it has any of the other effects from the cheat, though.
!!!
Re: LunaDLL/LunaLUA help thread
Try setting it to -1 and see what happens. Because VB6 usally takes "-1" as true and 0 as false. Other values might give unexpected behaviour.Holy wrote: Yeah, and if you're constantly setting it to 1 like I am the cheat won't even work. I don't actually know how weird that is, but it seems WEIRD
Re: LunaDLL/LunaLUA help thread
Yup, -1 is the full cheat. Wonder if weird stuff happens like this anywhere else
- WestonSmith
- Bunny
- Posts: 191
- Joined: 11 years ago
Re: LunaDLL/LunaLUA help thread
Herp da derp time, but when using Lua for autoscroll, how do I stop the autoscroll?
I figure the solution is to set the speed to 0 (the boundaries can remain), but when I try to use OnEvent, it either (A) Set the speed to 0 upon loading the level or (B) Never calls the Event and the autoscroll keeps on going.
I figure it should look something like this (NOTE: StopScroll is the name of the event in the engine itself):
Any help would be much obliged.
I figure the solution is to set the speed to 0 (the boundaries can remain), but when I try to use OnEvent, it either (A) Set the speed to 0 upon loading the level or (B) Never calls the Event and the autoscroll keeps on going.
I figure it should look something like this (NOTE: StopScroll is the name of the event in the engine itself):
Any help would be much obliged.
Re: LunaDLL/LunaLUA help thread
I think you misunderstood the way how onEvent works.WestonSmith wrote:Herp da derp time, but when using Lua for autoscroll, how do I stop the autoscroll?
I figure the solution is to set the speed to 0 (the boundaries can remain), but when I try to use OnEvent, it either (A) Set the speed to 0 upon loading the level or (B) Never calls the Event and the autoscroll keeps on going.
I figure it should look something like this (NOTE: StopScroll is the name of the event in the engine itself):
Any help would be much obliged.
So first things first: All events are case-sensitive.
Code: Select all
OnEvent
Code: Select all
onEvent
Code: Select all
function onEvent(eventName)
if(eventName == "StopScroll")then
-- do stuff here
end
end
- WestonSmith
- Bunny
- Posts: 191
- Joined: 11 years ago
Re: LunaDLL/LunaLUA help thread
Thanks Kev, solved my problem.
-
- What about Ron magic?
- Posts: 699
- Joined: 11 years ago
- First name: Mikko J. Fuzzygrumbles
- Pronouns: he/him/his
- Location: Lots of miles from Vietnam
- Contact:
Re: LunaDLL/LunaLUA help thread
How does one change the amount of hits that it takes to kill a 'boss' npc?
Many people need desperately to receive this message: I feel and think much as you do, care about many of the things you care about, although most people do not care about them. You are not alone.
-Kurt Vonnegut
Context-free Supper Mario Broth Roulette! NOTE: Potential Jumpscare warning!
Avatar source (for most of them).
-Kurt Vonnegut
Context-free Supper Mario Broth Roulette! NOTE: Potential Jumpscare warning!