Page 38 of 76

Re: Need help with lua? - LunaLua General Help

Posted: Sat Nov 26, 2016 9:19 am
by DeMuZ
It worked! I'm always making code too complicated. xD

Re: Need help with lua? - LunaLua General Help

Posted: Sun Nov 27, 2016 1:44 pm
by pal4
Is there a lunalua code for spawning/shooting other npcs and projectiles? I can't find a list to confirm this.

Re: Need help with lua? - LunaLua General Help

Posted: Sun Nov 27, 2016 1:51 pm
by loop
I have a topic here.
This was an attempt to change Birdo eggs into Rinkas. I never tested it, so it might not work.

Re: Need help with lua? - LunaLua General Help

Posted: Sun Nov 27, 2016 1:56 pm
by PixelPest
pal4 wrote:Is there a lunalua code for spawning/shooting other npcs and projectiles? I can't find a list to confirm this.
There's also an NPC:transform function that works better than just changing the ID as Jayce 777 showed. I think it's part of HorikawaTools

Re: Need help with lua? - LunaLua General Help

Posted: Sun Nov 27, 2016 2:40 pm
by pal4
PixelPest wrote:
pal4 wrote:Is there a lunalua code for spawning/shooting other npcs and projectiles? I can't find a list to confirm this.
There's also an NPC:transform function that works better than just changing the ID as Jayce 777 showed. I think it's part of HorikawaTools
That's not even close to what I meant; what I meant is can you make an npc that normally doesn't shoot something do so? I'm hoping to make an npc that shoots in all four diagonals. If you could just provide a link to a list of lunalua codes...

Re: Need help with lua? - LunaLua General Help

Posted: Sun Nov 27, 2016 4:00 pm
by loop
pal4 wrote:
PixelPest wrote:
pal4 wrote:Is there a lunalua code for spawning/shooting other npcs and projectiles? I can't find a list to confirm this.
There's also an NPC:transform function that works better than just changing the ID as Jayce 777 showed. I think it's part of HorikawaTools
That's not even close to what I meant; what I meant is can you make an npc that normally doesn't shoot something do so? I'm hoping to make an npc that shoots in all four diagonals. If you could just provide a link to a list of lunalua codes...
That would be difficult, but it may be possible. :|

Re: Need help with lua? - LunaLua General Help

Posted: Sun Nov 27, 2016 4:23 pm
by PixelPest
LunaLua codes don't just exist. You have to use the Lua scripting language to write it. For this, you'll need pnpc.lua to have projectiles go in different directions, eventu to delay them (specifically eventu.setTimer()), and the NPC.spawn(). It's not too difficult if you understand how Lua works

Re: Need help with lua? - LunaLua General Help

Posted: Mon Nov 28, 2016 6:15 pm
by timocomsmbx2345
I stil rwally want to lnow how to code the screen manipulation from the Digital SHowdown from Hypnosis 2016 redo.

Re: Need help with lua? - LunaLua General Help

Posted: Mon Nov 28, 2016 9:45 pm
by PixelPest
You can look at the file itself. I'm pretty sure it has to do with drawing CaptureBuffers. I know it looks cool but I wouldn't suggest attempting something like that without much Lua experience

Re: Need help with lua? - LunaLua General Help

Posted: Wed Nov 30, 2016 3:14 pm
by Emral
timocomsmbx2345 wrote:I stil rwally want to lnow how to code the screen manipulation from the Digital SHowdown from Hypnosis 2016 redo.
You'll need the CaptureBuffer class, experience in Graphics.glDraw, math, knowledge on tables and rotation of vectors.
Once you have experience with all of that, it won't be hard to figure out how I created the screen manipulation. I'm not gonna teach it to you, because it's a very niche case requiring specific aspects of several parts of programming and I think it'd be better if you learned all those individual aspects instead.
And, as PixelPest said, you can look at the file itself, too. Keep in mind it's a good 2700 lines long and it's easy to get lost. There's an "ai3" function which handles the "Nanoteck" attack where he grabs the top half of the screen. You can look at that if you wanna find out how things work through the file. It won't allow you to reliably create this yourself, though, without knowing how the individual aspects work.

Re: Need help with lua? - LunaLua General Help

Posted: Sat Dec 03, 2016 9:14 am
by TDK
How do you change the speed of an NPC with a chase AI using lunalua?

Re: Need help with lua? - LunaLua General Help

Posted: Sat Dec 03, 2016 11:50 am
by DeMuZ
Is it possible to load an API from custom directory instead of LuaScriptsLib folder? (For example my own episode folder)

Re: Need help with lua? - LunaLua General Help

Posted: Sat Dec 03, 2016 11:54 am
by underFlo
API.load will look in the Level Folder, the Episode Folder and LuaScriptsLib in that order (maybe also other subfolders? idk, these 3 are the most frequent uses). So if you put the API into your episode folder everything should work out fine.

Re: Need help with lua? - LunaLua General Help

Posted: Sat Dec 03, 2016 12:55 pm
by timocomsmbx2345
So, howdo you use the new rinkas for an episode?

Re: Need help with lua? - LunaLua General Help

Posted: Sat Dec 03, 2016 1:09 pm
by loop
timocomsmbx2345 wrote:So, howdo you use the new rinkas for an episode?
Use moarrinkas.lua and NPCParse.lua.

Re: Need help with lua? - LunaLua General Help

Posted: Sat Dec 03, 2016 2:00 pm
by Mr10crossing
Is there a way I can make an NPC follow the player when the player gets a certain distance away from it? For example, when the player gets 5 units away from an SMB3 goomba, the goomba will change its direction towards the player.

Re: Need help with lua? - LunaLua General Help

Posted: Sat Dec 03, 2016 3:04 pm
by timocomsmbx2345
Jayce 777 wrote:
timocomsmbx2345 wrote:So, howdo you use the new rinkas for an episode?
Use moarrinkas.lua and NPCParse.lua.
but that didnt work for me the engine doesnt know those files are in th folders

Re: Need help with lua? - LunaLua General Help

Posted: Tue Dec 06, 2016 10:07 pm
by Quantix
timocomsmbx2345 wrote:
Jayce 777 wrote:
timocomsmbx2345 wrote:So, howdo you use the new rinkas for an episode?
Use moarrinkas.lua and NPCParse.lua.
but that didnt work for me the engine doesnt know those files are in th folders
Well, you need to type it as ("NPCs//moarrinkas") for it to work. Though, the API's kinda broken as of now so you're better off not using it anyway.

Re: Need help with lua? - LunaLua General Help

Posted: Sun Dec 11, 2016 12:44 pm
by Angelus
How to increase the health of a specific NPC?

Re: Need help with lua? - LunaLua General Help

Posted: Sun Dec 11, 2016 1:35 pm
by PixelPest