LunaLua Offical Thread - SMBX Usermod Framework

This is the place for discussion and support for LunaLua and related modifications and libraries.

Moderator: Userbase Moderators

Forum rules
Before you make a topic/post, consider the following:
-Is there a topic for this already?
-Is your post on topic/appropriate?
-Are you posting in the right forum/following the forum rules?

Shall I steam some LunaLua live development?

Yes
200
92%
No
17
8%
 
Total votes: 217
XerX
Foo
Foo
Posts: 1487
Joined: Fri Dec 20, 2013 3:33 pm

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby XerX » Mon Aug 03, 2015 9:49 pm

Text.print not printText

PersonNamedUser
Birdo
Birdo
Posts: 2882
Joined: Fri Feb 27, 2015 8:07 pm

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby PersonNamedUser » Mon Aug 03, 2015 10:02 pm

XerX wrote:Text.print not printText
I have no idea why it won't Work!

PersonNamedUser
Birdo
Birdo
Posts: 2882
Joined: Fri Feb 27, 2015 8:07 pm

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby PersonNamedUser » Tue Aug 04, 2015 12:17 am

Would this code work?

Code: Select all

function onLoop()
   --if player is holding glow
   if(player.holdingNPC == 158) then
     Text.print("Glow: Put me Down!", 0, 0)
   
  
   end
end

cramps-man
Koopa
Koopa
Posts: 15
Joined: Tue Dec 24, 2013 1:13 pm

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby cramps-man » Tue Aug 04, 2015 5:39 am

So as you can see in the documentation here: http://engine.wohlnet.ru/pgewiki/Player_%28class%29

The "player.holdingNPC" returns the NPC class. And as you can see in the NPC class documentation here: http://engine.wohlnet.ru/pgewiki/NPC_%28class%29

To get the NPC id, you will need to type,

if (player.holdingNPC.id == 158) then
/* blah code here */

XerX
Foo
Foo
Posts: 1487
Joined: Fri Dec 20, 2013 3:33 pm

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby XerX » Tue Aug 04, 2015 6:23 am

cramps-man wrote:So as you can see in the documentation here: http://engine.wohlnet.ru/pgewiki/Player_%28class%29

The "player.holdingNPC" returns the NPC class. And as you can see in the NPC class documentation here: http://engine.wohlnet.ru/pgewiki/NPC_%28class%29

To get the NPC id, you will need to type,

if (player.holdingNPC.id == 158) then
/* blah code here */
This is actually right.

You would have to do something like this.

Code: Select all

local player = Player();

function onLoop()
	if(player.holdingNPC ~= nil) then
		if(player.holdingNPC.id == 158) then
			Text.print("Put me down!",0,0);
		end
	end
end

HenryRichard
Birdo
Birdo
Posts: 2843
Joined: Mon Dec 23, 2013 12:09 pm
Flair: Is this where I type my password?
Contact:

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby HenryRichard » Tue Aug 04, 2015 7:27 pm

XerX wrote:

Code: Select all

local player = Player();

function onLoop()
	if(player.holdingNPC ~= nil) then
		if(player.holdingNPC.id == 158) then
			Text.print("Put me down!",0,0);
		end
	end
end
Which could be simplified to

Code: Select all

function onLoop()
	if(player.holdingNPC) then
		if(player.holdingNPC.id == 158) then
			Text.print("Put me down!",0,0);
		end
	end
end
Also, I found a bug with the OpenGL rendering - a level that looked perfectly fine before now looks like this:
Image
It's got all these weird lines and lags a TON, whereas with the old rendering it looked fine.

PersonNamedUser
Birdo
Birdo
Posts: 2882
Joined: Fri Feb 27, 2015 8:07 pm

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby PersonNamedUser » Tue Aug 04, 2015 7:33 pm

Great! It worked!

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

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby Kevsoft » Wed Aug 05, 2015 1:22 am

HenryRichard wrote:
XerX wrote:

Code: Select all

local player = Player();

function onLoop()
	if(player.holdingNPC ~= nil) then
		if(player.holdingNPC.id == 158) then
			Text.print("Put me down!",0,0);
		end
	end
end
Which could be simplified to

Code: Select all

function onLoop()
	if(player.holdingNPC) then
		if(player.holdingNPC.id == 158) then
			Text.print("Put me down!",0,0);
		end
	end
end
Also, I found a bug with the OpenGL rendering - a level that looked perfectly fine before now looks like this
Image
It's got all these weird lines and lags a TON, whereas with the old rendering it looked fine.
That render bug has been fixed. Wait for the next LunaLua version, which will come up soon.

HenryRichard
Birdo
Birdo
Posts: 2843
Joined: Mon Dec 23, 2013 12:09 pm
Flair: Is this where I type my password?
Contact:

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby HenryRichard » Wed Aug 05, 2015 8:51 pm

Kevsoft wrote:That render bug has been fixed. Wait for the next LunaLua version, which will come up soon.
That's good to know. I may have found another bug though - I'm getting an error with Graphics.drawImageToScene because it's apparently a nil value. This is my code:

Code: Select all

spritesheet = Graphics.loadImage("../spritesheet.png");

function onLoop()
Graphics.drawImageToScene(spritesheet, player.x, player.y, 0, 0, 100, 100);
end
Is this a problem with lunalua or with my code? I am using the latest version.

XerX
Foo
Foo
Posts: 1487
Joined: Fri Dec 20, 2013 3:33 pm

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby XerX » Wed Aug 05, 2015 9:24 pm

Is 'spritesheet.png' in the same directory as your code file? (lunadll.lua or lunaworld.lua)

HenryRichard
Birdo
Birdo
Posts: 2843
Joined: Mon Dec 23, 2013 12:09 pm
Flair: Is this where I type my password?
Contact:

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby HenryRichard » Wed Aug 05, 2015 10:56 pm

XerX wrote:Is 'spritesheet.png' in the same directory as your code file? (lunadll.lua or lunaworld.lua)
Yes, in fact I was able to make be placed in the level by using Graphics.placeSprite. I just need the extra arguments Graphics.drawImageToScene has.

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

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby Kevsoft » Thu Aug 06, 2015 12:59 am

For unreleased versions I add a version number to the description. LunaLua v0.7.1 has not been released yet. Just wait a few days and you will get it in your hands!

Axiom
Foo
Foo
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby Axiom » Thu Aug 06, 2015 8:33 am

Kevsoft wrote:For unreleased versions I add a version number to the description. LunaLua v0.7.1 has not been released yet. Just wait a few days and you will get it in your hands!
And for those who use my Module Manager, it will update it for you :D

HenryRichard
Birdo
Birdo
Posts: 2843
Joined: Mon Dec 23, 2013 12:09 pm
Flair: Is this where I type my password?
Contact:

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby HenryRichard » Fri Aug 07, 2015 6:05 pm

Kevsoft wrote:For unreleased versions I add a version number to the description. LunaLua v0.7.1 has not been released yet. Just wait a few days and you will get it in your hands!
...How did I miss that? I should really read the entire description before I try something. Thanks!

bigpotato
Swooper
Swooper
Posts: 52
Joined: Fri Aug 07, 2015 4:13 pm

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby bigpotato » Mon Aug 10, 2015 11:47 am

Does this require lunaDLL to work? Or is it included?

Axiom
Foo
Foo
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby Axiom » Mon Aug 10, 2015 12:15 pm

bigpotato wrote:Does this require lunaDLL to work? Or is it included?
LunaDll is bundled for backwards compatibility reasons. So yes, you can download this and still run LunaDll's autocode and Lua ;)

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

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby Kevsoft » Tue Aug 18, 2015 2:14 pm

LunaLua v0.7.1 is out with following changes:
Spoiler: show
* Some various fixes for the opengl renderer.
* Added screenshot handling with the print-screen button.
* Working loops (intro sequence + main loop)

* Some new functions:
** Added various functions in the Misc-Namespace
** Added various functions in the Graphics-Namespace
** Added Audio.MusicTitle and Audio.MusicTitleTag to get the music title (saved as IDv3 metadata) of the current music file (works well with mp3 and ogg)

* New custom libraries:
** fade.lua - Easy and fast library for creating fade effects and color overlays
** sprite.lua - A library for creating custom animated sprites with movement abilities.
** vectR.lua - A vector library (used for colliders.lua)

HenryRichard
Birdo
Birdo
Posts: 2843
Joined: Mon Dec 23, 2013 12:09 pm
Flair: Is this where I type my password?
Contact:

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby HenryRichard » Tue Aug 18, 2015 4:59 pm

You forgot to include SDL2_mixer_ext.dll, so SMBX doesn't start.

Wohlstand
Van De Graf
Van De Graf
Posts: 2008
Joined: Tue Feb 11, 2014 4:44 pm
Flair: [ˈvoːlˌʃtant], 狐エンジニア
Pronouns: he/him
Contact:

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby Wohlstand » Wed Aug 19, 2015 12:03 am

HenryRichard wrote:You forgot to include SDL2_mixer_ext.dll, so SMBX doesn't start.
I just fixed that and repacked everything, download the "Update only" and extract missed SDL2_mixer_ext.dll into your lunalua directory.

PersonNamedUser
Birdo
Birdo
Posts: 2882
Joined: Fri Feb 27, 2015 8:07 pm

able to give characters a running animation With Lunalua?

Postby PersonNamedUser » Sat Aug 22, 2015 7:50 pm

I was just wondering with lunalua can you give characters extra animations?
If so then how?


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 2 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari