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?
Does anyone know how to make a money system sort of like the one Sambo has on his episode?
I'm trying to figure out lunalua, but i really can't understand the commands. Does anyone know how I can implement a
money system?
EDIT:
I'm actually going to try to figure this out myself.
Last edited by PersonNamedUser on Sat Nov 21, 2015 2:04 pm, edited 1 time in total.
Guys, there is a (new) bug in the 7.2.2 version of SMBX 1.3.0.2 (haven't tested 1.3.0.1). After start, if you load an episode that has custom NPC graphics FIRST, then quitting and load an episode that has the default NPC graphics, the NPC's mask gets messed up (the old custom mask will still be used). However this doesn't happen if you load an episode with default graphics first and THEN another one that has custom graphics.
Not sure if this only applies to NPC custom graphics...
Voymo wrote:Guys, there is a (new) bug in the 7.2.2 version of SMBX 1.3.0.2 (haven't tested 1.3.0.1). After start, if you load an episode that has custom NPC graphics FIRST, then quitting and load an episode that has the default NPC graphics, the NPC's mask gets messed up (the old custom mask will still be used). However this doesn't happen if you load an episode with default graphics first and THEN another one that has custom graphics.
Not sure if this only applies to NPC custom graphics...
Are you talking about the custom NPC graphics with ".gif" or the new one with ".png"?
lotus006 wrote:I'm really surprised about the progress i've done to my inventory, I started now savedata and it's almost work now for when we collect items it's follow you
over the level , just a question how i'm saving onto the folder where is lunaworld instead of the level folder ?
And also I'm stuck again with sprites, I have some question about the size of the addon when he is finished for the user, is it a problem
if the pack will be over 3 or 4 mb the size I mean ? and I try to do concatenate
local SelMushroom = {}
for i=1, 6 do
table.insert(SelMushroom .. i , Graphics.loadImage(resPath .. "\\SelMushroom.png") );
end
it's say i can concatenate a upvalue something like this, or I got an another solution is to duplicate img "\\SelMushroom" .. i .. ".png "
but the size of the addon will grow alot with this
Any solutions ?
I'm desesperate with loop and local variable of image nothing work because uservalue
Thanks in advance.
Ok I think I start to understand why no one have already made the inventory mode, is already started in the lunalua LuaScriptsLib folder but not yet finished
I think is not possible to make the original one because there is no possible way to make more than 1 same sprites without make a copy of the png when
is loaded in the game the same png will not appear until you make a copy of a copy of the png, I hope in the next Lunalua this bug will be corrected.
I will take a break now because I think is impossbile to make the inventory mode for now.
PS.: Is there a reason why smb3inventory is in the folder but not working. ?
lotus006 wrote:because there is no possible way to make more than 1 same sprites without make a copy of the png when
is loaded in the game the same png will not appear until you make a copy of a copy of the png, I hope in the next Lunalua this bug will be corrected.
I will take a break now because I think is impossbile to make the inventory mode for now.
sprite = Graphics.loadImage("sprite.png)
function onLoop()
Graphics.drawImage(sprite, 0, 0)
Graphics.drawImage(sprite, 32, 0)
Graphics.drawImage(sprite, 64, 0)
Graphics.drawImage(sprite, 96, 0)
end
Just a simple example of how to draw the same image multiple times.
lotus006 wrote:because there is no possible way to make more than 1 same sprites without make a copy of the png when
is loaded in the game the same png will not appear until you make a copy of a copy of the png, I hope in the next Lunalua this bug will be corrected.
I will take a break now because I think is impossbile to make the inventory mode for now.
sprite = Graphics.loadImage("sprite.png)
function onLoop()
Graphics.drawImage(sprite, 0, 0)
Graphics.drawImage(sprite, 32, 0)
Graphics.drawImage(sprite, 64, 0)
Graphics.drawImage(sprite, 96, 0)
end
Just a simple example of how to draw the same image multiple times.
Thanks for this, but in this case it should work but I test on my stuff and isnt should work because
I use unplaceSprites also and is remove the last one because of this
This is how I use this for moving graphic
or maybe I can try I just have an idea but i dont know why before I tested without unplacesprites and I make it so laging because its placing indefinitely the sprites on the loops but now is not laging weird ?
I will test to make it when is not moving do not use function unplacesprites with If then else.
Edit :
I tried again without Unplacesprites but after 30 sec the game start to lag because the sprite is never stop to be added on the loop
but with Unplacesprites there is no problem if I leave it loaded even after 30 sec
HenryRichard wrote:Why not find a way to make it work with Graphics.drawImage?
what is the difference ?
Graphics.drawImage draws the image for only one frame - it's gone the next one.
Graphics.placeSprite makes the image drawn until it's removed with Graphics.unplaceSprite.
HenryRichard wrote:Why not find a way to make it work with Graphics.drawImage?
what is the difference ?
Graphics.drawImage draws the image for only one frame - it's gone the next one.
Graphics.placeSprite makes the image drawn until it's removed with Graphics.unplaceSprite.
Even if is in the loop section ?
And I can alway make moving with Graphics.drawImage ?
lotus006 wrote:
Even if is in the loop section ?
And I can alway make moving with Graphics.drawImage ?
I mean you can make dynamic x and y values depending on how many items are already in your inventory. Since drawImage is only shown for one frame, it's even easier "move" it than placeSprite (though I never used placeSprite so whatever)
lotus006 wrote:
Even if is in the loop section ?
And I can alway make moving with Graphics.drawImage ?
I mean you can make dynamic x and y values depending on how many items are already in your inventory. Since drawImage is only shown for one frame, it's even easier "move" it than placeSprite (though I never used placeSprite so whatever)
Oh I didnt know about this one i was thinking it's just an older code from older version, thanks I will try soon
Edit :
oh it's work without lagging, sorry guy's I'm feeling so embarrassed :S
I love so much Lua , and I have alot of Idea what to do now I can do everything with this toy and music in background meh !! haha thanks guy again
Next stuff maybe, I will try to implant Zelda 2 power menu or shop stuff with points (everyone know in Mario Points is useless then now it will be )
Edit2 :
But how I remove now Graphics.drawImage instead of Graphics.unplaceSprites ? is it the same thing ?
I have almost a beta release for the inventory mode, it work pretty good as I expecting
I hate so much placesprites lolll
before I release it i need to fix some sprites align it and make it with a stock i mean amount of the items when
you take the items will have -1 each times like in the normal game
and more than 1 row also maybe 4, and make it 2 mode smb4 advance and snes mode
there is a preview in video
thanks guy for your help
Edit: Oh and maybe an extra I will try to recreate the Warp Whistle and the world map
+ yoshi egg and hand items who will work only in game not on world in the future
function Onload()
raocoin = loadSharedAPI("raocoin2");
coins = raocoin.registerCurrency(10, true, 472, 66);
coins = raocoin.registerCurrency(33, true, 472, 66);
coins = raocoin.registerCurrency(88, true, 472, 66);
coins = raocoin.registerCurrency(133, true, 472, 66);
coins = raocoin.registerCurrency(152, true, 472, 66);
coins = raocoin.registerCurrency(251, true, 472, 66);
coins = raocoin.registerCurrency(252, true, 472, 66);
coins = raocoin.registerCurrency(253, true, 472, 66);
coins = raocoin.registerCurrency(258, true, 472, 66);
coins = raocoin.registerMemCurrency(0x00B2C5A8,FIELD_WORD,true,false);
end
function Onloop()
Currency:onCollect(1, 10) if not
then elseif
Currency:onCollect(1, 33) if not
then elseif
Currency:onCollect(1, 88) if not
then elseif
Currency:onCollect(1, 133) if not
then elseif
Currency:onCollect(1, 152) if not
then elseif
Currency:onCollect(1, 251) if not
then elseif
Currency:onCollect(5, 252) if not
then elseif
Currency:onCollect(20, 253) if not
then elseif
Currency:onCollect(5, 258) if not
if not
end
end
end
end
And It won't work. I need help to figure this out.
I have a VERY HARD TIME believing that "if not then elseif" is a legitimate line.
Also, load APIs outside of any functions.
Also, you're setting the value "coins" repeatedly. What you're essentially doing in onLoad is overwriting a bunch of stuff. Only the last time you define "coins" will actually be relevant, because it's the one up to date. It's like defining:
Hello = 1
Hello = 2
Hello = 1
Hello = 2
Hello = 5
while you could just write
Hello = 5
which would give the same result.
lotus006 wrote:Thanks I'm stupid sometimes sorry again :)
I have almost a beta release for the inventory mode, it work pretty good as I expecting
I hate so much placesprites lolll
before I release it i need to fix some sprites align it and make it with a stock i mean amount of the items when
you take the items will have -1 each times like in the normal game :D
and more than 1 row also maybe 4, and make it 2 mode smb4 advance and snes mode :)
there is a preview in video :)
thanks guy for your help :D
Edit: Oh and maybe an extra I will try to recreate the Warp Whistle and the world map :)
+ yoshi egg and hand items who will work only in game not on world in the future :D
That's pretty neat. I was working on something similar myself to go with the Overhaul mod, but never got around to finishing it. Maybe I should finish it just for the heck of it.