Page 14 of 47

Re: able to give characters a running animation With Lunalua

Posted: Sun Aug 23, 2015 5:33 pm
by TheKingOfBoos
Somebody should at least answer this so here you go:
Spoiler: show
I have no idea.

Re: able to give characters a running animation With Lunalua

Posted: Sun Aug 23, 2015 5:47 pm
by Valtteri
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.

Re: able to give characters a running animation With Lunalua

Posted: Sun Aug 23, 2015 7:33 pm
by XerX
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.

Re: able to give characters a running animation With Lunalua

Posted: Sun Aug 23, 2015 7:35 pm
by TheKingOfBoos
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?

Re: able to give characters a running animation With Lunalua

Posted: Mon Aug 24, 2015 9:08 pm
by HenryRichard
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.

Re: LunaLua Offical Thread [Streaming Question Poll]

Posted: Tue Aug 25, 2015 9:19 pm
by Artemis008
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?

Re: LunaLua Offical Thread [Streaming Question Poll]

Posted: Tue Aug 25, 2015 9:25 pm
by XerX
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.

Re: LunaLua Offical Thread [Streaming Question Poll]

Posted: Wed Aug 26, 2015 12:45 am
by FanofSMBX
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?

Re: LunaLua Offical Thread [Streaming Question Poll]

Posted: Wed Aug 26, 2015 6:18 pm
by Artemis008
Another question,is it possible to make Mario use Toad or Peach's Hearts that represent their health?

Re: LunaLua Offical Thread [Streaming Question Poll]

Posted: Thu Aug 27, 2015 6:04 pm
by Phil
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!

Re: LunaLua Offical Thread [Streaming Question Poll]

Posted: Thu Aug 27, 2015 6:42 pm
by Artemis008
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

Re: LunaLua Offical Thread [Streaming Question Poll]

Posted: Fri Aug 28, 2015 7:12 am
by Kevsoft
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.)

Re: LunaLua Offical Thread [Streaming Question Poll]

Posted: Fri Aug 28, 2015 3:19 pm
by Artemis008
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!

Re: LunaLua Offical Thread [Streaming Question Poll]

Posted: Fri Aug 28, 2015 3:25 pm
by Imaynotbehere4long
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.

Re: LunaLua Offical Thread [Streaming Question Poll]

Posted: Sun Aug 30, 2015 10:25 pm
by Artemis008
Can someone help me make a shop like the one in MAT7O,i have tried countless times but cant get one to work,

Re: LunaLua Offical Thread [Streaming Question Poll]

Posted: Mon Aug 31, 2015 7:59 pm
by Axiom
You need to have a global currency that carries over throughout using the user data class.

Re: LunaLua Offical Thread [Streaming Question Poll]

Posted: Mon Aug 31, 2015 10:22 pm
by Artemis008
But how do you do that?
I'm not good at scripting by the way.

Re: LunaLua Offical Thread [Streaming Question Poll]

Posted: Wed Sep 02, 2015 8:42 pm
by HenryRichard
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.

Re: LunaLua Offical Thread [Streaming Question Poll]

Posted: Wed Sep 02, 2015 9:19 pm
by Axiom
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.

Re: LunaLua Offical Thread [Streaming Question Poll]

Posted: Thu Sep 03, 2015 9:55 pm
by PersonNamedUser
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