Search found 54 matches

Go to advanced search

by S1eth
Sat May 07, 2016 10:39 am
Forum: LunaLua
Topic: Need help with lua? - LunaLua General Help
Replies: 1502
Views: 159811

Re: Need help with lua? - LunaLua General Help

Thanks so much! Didn't even cross my mind to do so I'll try that. Thanks for the suggestion Also, I've seen it done before, does anyone know what the co-ordinates of where a Dragon Coin counter would lie if I put it directly below the 1-up counter? I know I could just use trial and error, but I've ...
by S1eth
Fri May 06, 2016 4:16 pm
Forum: LunaLua
Topic: Magikoopa.lua
Replies: 23
Views: 4636

Re: Magikoopa API

http://hastebin.com/vipohebela.lua ... umm, you just posted my code. Did you read my previous post? He just took your API .lua file and pasted magikoopa = loadSharedAPI("magikoopa") magikoopa.section = {0} into it assuming it would magically work. @pal4: You can't just put the loading code into the...
by S1eth
Fri May 06, 2016 1:07 pm
Forum: LunaLua
Topic: Need help with lua? - LunaLua General Help
Replies: 1502
Views: 159811

Re: Need help with lua? - LunaLua General Help

I want to make the snowing effect to appear in 1st and 2nd section, but not in 3rd. How can I do that? The easiest way would probably be to only execute the Draw function when you are in a specific section. function onCameraUpdate() if(player.section == 0 or player.section == 1) then effect:Draw();...
by S1eth
Sat Apr 30, 2016 8:17 am
Forum: LunaLua
Topic: Need help with lua? - LunaLua General Help
Replies: 1502
Views: 159811

Re: Need help with lua? - LunaLua General Help

What Spinda said. I did this quickly and obviously without testing. object:function() is just syntactic sugar for object.function(object), and collidesWith requires two parameters (the block, and the player). for e,f in pairs(Block.get(633)) do As a general recommendation: e,f is your (key, value) p...
by S1eth
Sat Apr 30, 2016 7:34 am
Forum: LunaLua
Topic: Need help with lua? - LunaLua General Help
Replies: 1502
Views: 159811

Re: Need help with lua? - LunaLua General Help

Can I make check if player touches ice block? I have that: timerApi.setSecondsLeft(timerApi.getSecondsLeft()-3) and I want to reduce time every time that player touches ice block. You can use (Block.collidesWith(player) > 0) to check if a player touches a block. for _,iceblock in pairs(Block.get(pu...
by S1eth
Wed Apr 27, 2016 1:50 pm
Forum: LunaLua
Topic: Need help with lua? - LunaLua General Help
Replies: 1502
Views: 159811

Re: Need help with lua? - LunaLua General Help

I loaded HealthPoint.lua and my code worked but your fixing code didn't. The error I get is: bad argument #1 to 'pairs' (table expected, got nil) That means you are not using the updated HealthPoint.lua file I provided you with. You have to load the api I uploaded or it's not going to work. I am wo...
by S1eth
Wed Apr 27, 2016 6:26 am
Forum: LunaLua
Topic: Need help with lua? - LunaLua General Help
Replies: 1502
Views: 159811

Re: Need help with lua? - LunaLua General Help

Your code doesn't work mate. I tested it and I've edited it a few times and no hope. Because api has to be in a LuaScriptsLib folder It was in the LuaScriptsLib folder but the code he gave us still didn't work. :( It works for me. And I assume it works for Mario_and_Luigi_55 as well? It was in the ...
by S1eth
Tue Apr 26, 2016 2:53 pm
Forum: LunaLua
Topic: Need help with lua? - LunaLua General Help
Replies: 1502
Views: 159811

Re: Need help with lua? - LunaLua General Help

Tried it. no luck. I'm pretty sure that's not how you get an npc id. npcID.lua includes a bunch of constants for easy use. NPCID.BIRDOEGG = 40 I'm starting to think your lunadll.lua file is in the wrong directory. Is it one folder down from where the level file is located? It is. Folder named 29. I...
by S1eth
Tue Apr 26, 2016 1:37 pm
Forum: LunaLua
Topic: Need help with lua? - LunaLua General Help
Replies: 1502
Views: 159811

Re: Need help with lua? - LunaLua General Help

Has anyone forgotten about me? I'm not really making levels with LunaLua right now. I'm messing around with it and experimenting with it so I can get used to it. The NPCs all take more hits even when I've set the ID to 1 NPC with HealthPoint.lua . I have same problem. It's not you. HealthPoint is b...
by S1eth
Tue Apr 26, 2016 10:22 am
Forum: LunaLua
Topic: Need help with lua? - LunaLua General Help
Replies: 1502
Views: 159811

Re: Need help with lua? - LunaLua General Help

http://hastebin.com/wasilejise.lua Any last flaws? Or is my code doomed to never work no matter what? What's the problem? Your code works. An issue I see with it is that it only works if there is only a single birdo egg in the world at one time. You are selecting the last index from tableOfBirdoEgg...
by S1eth
Sun Apr 24, 2016 2:57 pm
Forum: LunaLua
Topic: Need help with lua? - LunaLua General Help
Replies: 1502
Views: 159811

Re: Need help with lua? - LunaLua General Help

if(tonumber(tableOfBirdo[1]:mem(0xF0, FIELD_DFLOAT)) = 1) You may want to use "==" here instead of an assigning 1 to the left hand value. math.random(0, 2); Just letting you know that the first time you call math.random, you will always receive the same result. math.random has caused trouble for so...
by S1eth
Sun Apr 24, 2016 11:12 am
Forum: LunaLua
Topic: Need help with lua? - LunaLua General Help
Replies: 1502
Views: 159811

Re: Need help with lua? - LunaLua General Help

http://hastebin.com/zenofukayi.lua Mind you the Text.print line was to check to see how the random generation worked. Still nothing different. if(tonumber(tableOfBirdo[1]:mem(0xF0, FIELD_DFLOAT)) = 1) You may want to use "==" here instead of assigning 1 to the left hand value. math.random(0, 2); Ju...
by S1eth
Sat Apr 23, 2016 12:48 pm
Forum: LunaLua
Topic: Need help with lua? - LunaLua General Help
Replies: 1502
Views: 159811

Re: Need help with lua? - LunaLua General Help

And can I make lua do this code until end of table? Right now this code only checks the first position of table. http://www.hastebin.com/ejedeyawuz.lua also this didn't work You need to iterate over the table and check for every index if the table value equals the new powerup value. Here, I made a ...
by S1eth
Sat Apr 23, 2016 10:48 am
Forum: LunaLua
Topic: Need help with lua? - LunaLua General Help
Replies: 1502
Views: 159811

Re: Need help with lua? - LunaLua General Help

Yes. You can call it whatever you want for example: local something = API.load "HealthPoint" But then you don't use HealthPoint.setNPCHealth(npcID, Health) , but something.setNPCHealth(npcID, Health) Also, I want to improve the ? mushroom (npc-273). I want to make it give player completely random N...

Go to advanced search