LunaDLL - SMBX Extension Module

This is where we'll store the "best" topics that have ever existed on the forums, as well as community events that are no longer relevant. Read at your own risk.
Forum rules
Read at your own risk.
lighthouse64
Charged Spiny
Charged Spiny
Posts: 1804
Joined: Sat Apr 26, 2014 6:28 am

Re: LunaDLL - SMBX Extension Module

Postby lighthouse64 » Sat Nov 01, 2014 12:41 am

leif_erikson wrote:Isn't it only judges will need lunadll? I don't see why regular entrants would need it to make vanilla levels.
Um maybe he's a judge???

Kevsoft
Flurry
Flurry
Posts: 374
Joined: Sun Jul 27, 2014 8:03 am

Re: LunaDLL - SMBX Extension Module

Postby Kevsoft » Sat Nov 01, 2014 4:25 am

The new Animation/Effect System in the upcoming LunaLua version:


lighthouse64
Charged Spiny
Charged Spiny
Posts: 1804
Joined: Sat Apr 26, 2014 6:28 am

Re: LunaDLL - SMBX Extension Module

Postby lighthouse64 » Sat Nov 01, 2014 12:56 pm

Kevsoft wrote:The new Animation/Effect System in the upcoming LunaLua version:

Isn't that the earthquake effect?

Kevsoft
Flurry
Flurry
Posts: 374
Joined: Sun Jul 27, 2014 8:03 am

Re: LunaDLL - SMBX Extension Module

Postby Kevsoft » Sat Nov 01, 2014 4:07 pm

It more about the random explosion effect. Normally it is only used by SMBX for the mother brain kill animation but I managed to access the SMBX effect system to run my own effects.

lighthouse64
Charged Spiny
Charged Spiny
Posts: 1804
Joined: Sat Apr 26, 2014 6:28 am

Re: LunaDLL - SMBX Extension Module

Postby lighthouse64 » Sun Nov 02, 2014 12:51 am

Kevsoft wrote:It more about the random explosion effect. Normally it is only used by SMBX for the mother brain kill animation but I managed to access the SMBX effect system to run my own effects.
Oh. That's cool I guess u turned the crab into the brain :P, But adding the quake made it more interesting. Also, Didn't you activate that by killing an npc??? If so, how do you activate things by npc kill??? Like this?

Code: Select all

Onnpckill()
blah blah blah
end

Kevsoft
Flurry
Flurry
Posts: 374
Joined: Sun Jul 27, 2014 8:03 am

Re: LunaDLL - SMBX Extension Module

Postby Kevsoft » Sun Nov 02, 2014 1:47 am

Code: Select all

function isCrabDead() return findnpcs(209, -1)[0] == nil end
But this only works if there is only one NPC of that type in the level.

lighthouse64
Charged Spiny
Charged Spiny
Posts: 1804
Joined: Sat Apr 26, 2014 6:28 am

Re: LunaDLL - SMBX Extension Module

Postby lighthouse64 » Sun Nov 02, 2014 1:58 am

Kevsoft wrote:

Code: Select all

function isCrabDead() return findnpcs(209, -1)[0] == nil end
But this only works if there is only one NPC of that type in the level.
Oh thx. You can do this with any npc right? You just do

Code: Select all

	function isCoinDead()
return findnpcs(10,-1)[0] == nil end
uservar["shopcoins"] = uservar["shopcoins"] + 1
		UserData.save()


		end
And you can add anything u want inside of this function... I'm pretty sure. :P

Kevsoft
Flurry
Flurry
Posts: 374
Joined: Sun Jul 27, 2014 8:03 am

Re: LunaDLL - SMBX Extension Module

Postby Kevsoft » Sun Nov 02, 2014 4:09 am

isCrabDead was intended to be a own function to be then used the the Loop function:

Code: Select all

function onLoop()
  if(isCrabDead)then
    --Do stuff
  end
end

lighthouse64
Charged Spiny
Charged Spiny
Posts: 1804
Joined: Sat Apr 26, 2014 6:28 am

Re: LunaDLL - SMBX Extension Module

Postby lighthouse64 » Sun Nov 02, 2014 10:51 pm

Kevsoft wrote:isCrabDead was intended to be a own function to be then used the the Loop function:

Code: Select all

function onLoop()
  if(isCrabDead)then
    --Do stuff
  end
end
Oh ok thx :) Makes more sense since u can't make custom functions.

SparkerStorm
Guest

Re: LunaDLL - SMBX Extension Module

Postby SparkerStorm » Thu Nov 06, 2014 10:22 am

Okay, I need help. I've tried everything I possibly could, but nothing seems to work. I'm making a Boss Rush Mode, and for the first level you fight each Goomba one by one, and each one of them takes one more hit than the last one. I'm very new to coding, but I even used DarkShadeX's Lunadll.txt generator program to make it easier, but not even that works. Here's the code:

#1
//Set all NPCs that have the given NPCID to have taken HITS amount of hits.

SetHits,27,1,-1,0,2,0

//Set all NPCs that have the given NPCID to have taken HITS amount of hits.

SetHits,1,1,-2,0,2,0

//Set all NPCs that have the given NPCID to have taken HITS amount of hits.

SetHits,2,1,-3,0,2,0

//Set all NPCs that have the given NPCID to have taken HITS amount of hits.

SetHits,244,1,-4,0,2,0

//Set all NPCs that have the given NPCID to have taken HITS amount of hits.

SetHits,3,1,-5,0,2,0

//Set all NPCs that have the given NPCID to have taken HITS amount of hits.

SetHits,71,1,-6,0,2,0
#END

If anyone can tell me what I'm doing wrong, or give me the correct code, I would be eternally grateful.

RudeGuy
Fry Guy
Fry Guy
Posts: 4991
Joined: Fri Dec 27, 2013 7:36 am
Flair: local guy

Re: LunaDLL - SMBX Extension Module

Postby RudeGuy » Thu Nov 06, 2014 10:31 am

You can't change the number of hits the NPC has to take to die if the NPC isn't a boss.

leif_erikson
Tweeter
Tweeter
Posts: 167
Joined: Thu Feb 06, 2014 12:23 pm

Re: LunaDLL - SMBX Extension Module

Postby leif_erikson » Thu Nov 06, 2014 9:11 pm

Regular goombas weren't programmed to take more than 1 hit

FanofSMBX
Mouser
Mouser
Posts: 3878
Joined: Sun Dec 22, 2013 12:01 pm

Re: LunaDLL - SMBX Extension Module

Postby FanofSMBX » Thu Nov 06, 2014 9:16 pm

leif_erikson wrote:Regular goombas weren't programmed to take more than 1 hit
AKA they literally can't have more hits. It's not an idea in the game, thus no one can change how it works. Once something touches them, there's not an incrementing counter. Trigger death effect. Bye bye. See you later.

Sorry for swooping in like that Kil, I just thought that that could be confusing to new people as is.

lighthouse64
Charged Spiny
Charged Spiny
Posts: 1804
Joined: Sat Apr 26, 2014 6:28 am

Re: LunaDLL - SMBX Extension Module

Postby lighthouse64 » Thu Nov 06, 2014 11:53 pm

Does anyone know why this has a problem at the loadAPI are?

Code: Select all

[code]function onLoop()

	local raocoin = loadAPI("raocoin")
 
	raocoin.items[1] = raocoin.shopItem(1, 1, 1, 1, 1, "iceflower", function() triggerEvent("getitem") end);
		
		printText("money:"..tostring(),30,60)
			
			function buyItem()
			
				end
			end
[/code]

leif_erikson
Tweeter
Tweeter
Posts: 167
Joined: Thu Feb 06, 2014 12:23 pm

Re: LunaDLL - SMBX Extension Module

Postby leif_erikson » Fri Nov 07, 2014 12:38 am

FanofSMBX wrote:
leif_erikson wrote:Regular goombas weren't programmed to take more than 1 hit
AKA they literally can't have more hits. It's not an idea in the game, thus no one can change how it works. Once something touches them, there's not an incrementing counter. Trigger death effect. Bye bye. See you later.

Sorry for swooping in like that Kil, I just thought that that could be confusing to new people as is.
If you want to answer for me it'll just make it a lot easier for me

lighthouse64
Charged Spiny
Charged Spiny
Posts: 1804
Joined: Sat Apr 26, 2014 6:28 am

Re: LunaDLL - SMBX Extension Module

Postby lighthouse64 » Fri Nov 07, 2014 8:35 am

Here's a really lame script I made:

Code: Select all

function onLoad()
jumpheight(25)
end
function onLoop()

end
function onJump()
playSFX("1up.mp3")
end
You'll here a ding sound every time you jump :P

SparkerStorm
Guest

Re: LunaDLL - SMBX Extension Module

Postby SparkerStorm » Fri Nov 07, 2014 10:12 am

FanofSMBX wrote:
leif_erikson wrote:Regular goombas weren't programmed to take more than 1 hit
AKA they literally can't have more hits. It's not an idea in the game, thus no one can change how it works. Once something touches them, there's not an incrementing counter. Trigger death effect. Bye bye. See you later.

Sorry for swooping in like that Kil, I just thought that that could be confusing to new people as is.
Alright, so if I can't use LunaDll to help me out, isn't there a way to make it so when you kill ONE goomba, another one pops in right where he died, and if you remove the death animation for said goomba, it gives the effect of multiple hits? How would I do that?

RudeGuy
Fry Guy
Fry Guy
Posts: 4991
Joined: Fri Dec 27, 2013 7:36 am
Flair: local guy

Re: LunaDLL - SMBX Extension Module

Postby RudeGuy » Fri Nov 07, 2014 10:17 am

Use events and layers. For 2 goombas, make 1 layer for the second goomba and make an event where you have to put put in toggle layers the layer of the second goomba. Repeat this thing for each new goomba you put. Hope I explained well this.

lighthouse64
Charged Spiny
Charged Spiny
Posts: 1804
Joined: Sat Apr 26, 2014 6:28 am

Re: LunaDLL - SMBX Extension Module

Postby lighthouse64 » Fri Nov 07, 2014 10:24 am

SparkerStorm wrote:
FanofSMBX wrote:
leif_erikson wrote:Regular goombas weren't programmed to take more than 1 hit
AKA they literally can't have more hits. It's not an idea in the game, thus no one can change how it works. Once something touches them, there's not an incrementing counter. Trigger death effect. Bye bye. See you later.

Sorry for swooping in like that Kil, I just thought that that could be confusing to new people as is.
Alright, so if I can't use LunaDll to help me out, isn't there a way to make it so when you kill ONE goomba, another one pops in right where he died, and if you remove the death animation for said goomba, it gives the effect of multiple hits? How would I do that?
Uh, You could use lua. IDK how to do it exactly, but it would be something like this:

Code: Select all

function onLoop()
if(goombaisdead) then
return findnpcs(1,-1)[0] == nil end
 	NPC.activateEventName
end
end
But it would be much easier to do it with events. :P

FanofSMBX
Mouser
Mouser
Posts: 3878
Joined: Sun Dec 22, 2013 12:01 pm

Re: LunaDLL - SMBX Extension Module

Postby FanofSMBX » Fri Nov 07, 2014 10:30 am

Step 1: place second Goomba on a layer then mark it invisible
Step 2. Attach a regular Goomba to that layer
Step 3: upon first Goomba's death use an event to show second Goomba. It shows up right where the first one was.


Return to “Archives”

Who is online

Users browsing this forum: No registered users and 1 guest