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
TheKingOfBoos
Panser
Panser
Posts: 1016
Joined: Sun Jul 05, 2015 4:16 pm

Re: able to give characters a running animation With Lunalua

Postby TheKingOfBoos » Sun Aug 23, 2015 5:33 pm

Somebody should at least answer this so here you go:
Spoiler: show
I have no idea.

Valtteri
Van De Graf
Van De Graf
Posts: 2150
Joined: Sun Dec 01, 2013 1:16 pm

Re: able to give characters a running animation With Lunalua

Postby Valtteri » Sun Aug 23, 2015 5:47 pm

SuperMario12345 wrote:I was just wondering with lunalua can you give characters extra animations?
If so then how?
Questions about Luna Lua should be posted in its thread. Merged topic.
TheKingOfBoos wrote:Somebody should at least answer this so here you go:
Spoiler: show
I have no idea.
Do not make useless posts.

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

Re: able to give characters a running animation With Lunalua

Postby XerX » Sun Aug 23, 2015 7:33 pm

TheKingOfBoos wrote:Somebody should at least answer this so here you go:
Spoiler: show
I have no idea.
If you have no idea then don't answer.

TheKingOfBoos
Panser
Panser
Posts: 1016
Joined: Sun Jul 05, 2015 4:16 pm

Re: able to give characters a running animation With Lunalua

Postby TheKingOfBoos » Sun Aug 23, 2015 7:35 pm

XerX wrote:
TheKingOfBoos wrote:Somebody should at least answer this so here you go:
Spoiler: show
I have no idea.
If you have no idea then don't answer.
Ok, lesson learned. Won't do it again. Anyway, CAN you give characters a running animation?

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

Re: able to give characters a running animation With Lunalua

Postby HenryRichard » Mon Aug 24, 2015 9:08 pm

TheKingOfBoos wrote:Anyway, CAN you give characters a running animation?
I've been thinking about how I might be able to rerender the character using Graphics.drawImageToScene - it would certainly open up a lot of new possibilities!
Is there a way to instantly exit the level with any exit code? I'm working on a flagpole code and I'd like to be able to have multiple flagpoles in the same level that open up different paths. I'm able to do

Code: Select all

Level.winState(2);
, but that takes a while to actually exit.

Artemis008
Boomerang Bro
Boomerang Bro
Posts: 1346
Joined: Mon Jul 06, 2015 4:34 pm

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby Artemis008 » Tue Aug 25, 2015 9:19 pm

I saw a SMB3 world map inventory in the LuaScripts folder,but I cant figure out what code I need to use it as there is no ReadMe for the file,does anyone know the code(s) needed or is it not ready for use?

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

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby XerX » Tue Aug 25, 2015 9:25 pm

Artemis008 wrote:I saw a SMB3 world map inventory in the LuaScripts folder,but I cant figure out what code I need to use it as there is no ReadMe for the file,does anyone know the code(s) needed or is it not ready for use?
It's not ready.

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

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby FanofSMBX » Wed Aug 26, 2015 12:45 am

So here it goes:

1. Replace Player's Fireball with Rinka
2. It bounces off of floor diagonally
3. (The problem) it attaches to ceiling

How do I make it always bounce diagonal?

Artemis008
Boomerang Bro
Boomerang Bro
Posts: 1346
Joined: Mon Jul 06, 2015 4:34 pm

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby Artemis008 » Wed Aug 26, 2015 6:18 pm

Another question,is it possible to make Mario use Toad or Peach's Hearts that represent their health?

Phil
Rex
Rex
Posts: 38
Joined: Tue Jan 07, 2014 7:00 pm

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby Phil » Thu Aug 27, 2015 6:04 pm

Hello everyone! I want to update Legend of Mario, and i want to use Luna Lua, but i need someone to help me out. I dont know how to use this program... Here is the list of all i want:

-Use the SMB3 HUD made by XerX with the timer
-Be able to put more than one star in a level section
-Resize the screen intro snes sized, the frame can be a black frame.
-Be able to use starman, if someone figured out how!

So i need help, thank you for all the support!

Artemis008
Boomerang Bro
Boomerang Bro
Posts: 1346
Joined: Mon Jul 06, 2015 4:34 pm

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby Artemis008 » Thu Aug 27, 2015 6:42 pm

Phil wrote:Hello everyone! I want to update Legend of Mario, and i want to use Luna Lua, but i need someone to help me out. I dont know how to use this program... Here is the list of all i want:

-Use the SMB3 HUD made by XerX with the timer
-Be able to put more than one star in a level section
-Resize the screen intro snes sized, the frame can be a black frame.
-Be able to use starman, if someone figured out how!

So i need help, thank you for all the support!
I cant help with the star man or different screen sizes but I can get you the SMB3Hud mod

Just create a Luna World File in your episode and copy/paste this right in,

Code: Select all

 _smb3overhaul = loadAPI("smb3overhaul");

function onLoad()
	_smb3overhaul.setSecondsLeft(300);
	_smb3overhaul.setTimerState(true);
	_smb3overhaul.usesPBar(true);
	_smb3overhaul.useEasyMode(true);
	_smb3overhaul.usesCard(true);
end
And note that you CAN change the time limit to whatever you want as long as its not over 999

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

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby Kevsoft » Fri Aug 28, 2015 7:12 am

Artemis008 wrote:Another question,is it possible to make Mario use Toad or Peach's Hearts that represent their health?
I don't know, but you can check out this page: http://engine.wohlnet.ru/pgewiki/SMBX_Player_Offsets
However, I am afraid that it is controlled by the id, rather than an extra flag.

Phil wrote: -Use the SMB3 HUD made by XerX with the timer
Basically what Artemis008 said. In addition you might want to check out this page: https://github.com/XNBlank/LunaLua-Modules/releases
Phil wrote: -Be able to put more than one star in a level section
From the SMBX side there is no possible way, however you might can do tricks with the Data-class, i.e. constantly checking if how many star exist and if one is gone add the value to the your data-object.
Phil wrote: -Resize the screen intro snes sized, the frame can be a black frame.
Sorry mate, but LunaLua doesn't have full access to the intro screen.
Phil wrote: -Be able to use starman, if someone figured out how!
Might check out this: http://engine.wohlnet.ru/pgewiki/LunaLua_Examples
or this episode: http://www.smbxgame.com/forums/v ... 36&t=10805 (one of the screenshots indicated some sort of a starman.)

Artemis008
Boomerang Bro
Boomerang Bro
Posts: 1346
Joined: Mon Jul 06, 2015 4:34 pm

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby Artemis008 » Fri Aug 28, 2015 3:19 pm

Artemis008 wrote:
Phil wrote:Hello everyone! I want to update Legend of Mario, and i want to use Luna Lua, but i need someone to help me out. I dont know how to use this program... Here is the list of all i want:

-Use the SMB3 HUD made by XerX with the timer
-Be able to put more than one star in a level section
-Resize the screen intro snes sized, the frame can be a black frame.
-Be able to use starman, if someone figured out how!

So i need help, thank you for all the support!
I cant help with the star man or different screen sizes but I can get you the SMB3Hud mod

Just create a Luna World File in your episode and copy/paste this right in,

Code: Select all

 _smb3overhaul = loadAPI("smb3overhaul");

function onLoad()
	_smb3overhaul.setSecondsLeft(300);
	_smb3overhaul.setTimerState(true);
	_smb3overhaul.usesPBar(true);
	_smb3overhaul.useEasyMode(true);
	_smb3overhaul.usesCard(true);
end
And note that you CAN change the time limit to whatever you want as long as its not over 999


You should use it in your SMB3 remake as well!

Imaynotbehere4long
Boomerang Bro
Boomerang Bro
Posts: 1389
Joined: Thu Jan 23, 2014 3:00 pm

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby Imaynotbehere4long » Fri Aug 28, 2015 3:25 pm

Phil wrote:-Resize the screen intro snes sized, the frame can be a black frame.
You could attach black foreground objects to the HUD, if that's what your intended effect is.

Artemis008
Boomerang Bro
Boomerang Bro
Posts: 1346
Joined: Mon Jul 06, 2015 4:34 pm

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby Artemis008 » Sun Aug 30, 2015 10:25 pm

Can someone help me make a shop like the one in MAT7O,i have tried countless times but cant get one to work,

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

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby Axiom » Mon Aug 31, 2015 7:59 pm

You need to have a global currency that carries over throughout using the user data class.

Artemis008
Boomerang Bro
Boomerang Bro
Posts: 1346
Joined: Mon Jul 06, 2015 4:34 pm

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby Artemis008 » Mon Aug 31, 2015 10:22 pm

But how do you do that?
I'm not good at scripting by the way.

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 Sep 02, 2015 8:42 pm

Artemis008 wrote:But how do you do that?
I'm not good at scripting by the way.
Step one:
get good at scripting

...Okay that's not helpful, but what you should do is try and just write down what you want it to do. For example, you may want to:
1. Add the player's coins to user-data-thing and then set the coin count to zero.

While in the shop:
1. When the player presses an arrow key, change the displayed thing
2. When the player presses jump, check if they have enough money to buy the selected thing and if they do, give it to them and subtract the number from their money

I'm not entirely sure what you want to do, but I find that if I write things like this it makes coding MUCH easier.

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

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby Axiom » Wed Sep 02, 2015 9:19 pm

i wont outright write the code for you, 1. i'm a busy man, 2. it's ALOT of code. henryrichard's outline is a good starting point. it'll be mostly trial and error, and remember the PGE Wiki has a very good LunaLua reference section.

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

Re: LunaLua Offical Thread [Streaming Question Poll]

Postby PersonNamedUser » Thu Sep 03, 2015 9:55 pm

Does anyone know how to fix this code?
I want to make it where when you pick up a key a phanto chases you.

Code: Select all

local player = Player();

function onLoop()
   if(player.holdingNPC ~= nil) then
      if(player.holdingNPC.id == 31) then
	  Phanto:hide(true noSmoke)
	  Phanto Chasing:show(true noSmoke))
      end
   end
end


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 3 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari