Code: Select all
function onLoop()
if(player.holdingNPC)then
printText(tostring(player.holdingNPC.id), 270, 250)
end
end
Code: Select all
function onLoop()
if(player.holdingNPC)then
printText(tostring(player.holdingNPC.id), 270, 250)
end
end
Kevsoft wrote:Even better:Code: Select all
function onLoop() if(player.holdingNPC)then printText(tostring(player.holdingNPC.id), 270, 250) end end
Just to be sure, does it play nicely with frameskip?Kil wrote:Lunadll always loops once per frame, so you can just have something increment a variable and display it on screen
Thats something i would like to know too.Hoeloe wrote:Just to be sure, does it play nicely with frameskip?Kil wrote:Lunadll always loops once per frame, so you can just have something increment a variable and display it on screen
Yes! It's the same as Autocode handle it.Oddwrath wrote: Also, I asked this before, but didn't get an answer: how do I use playSFX([string] soundfile) and can it be used to play custom sfx from the level folder?
Code: Select all
playSFX("your_sound_file.mp3")
What do you mean with "default"? You might wanna just print out your current speed as text.Oddwrath wrote:What is the default player x and y speed in LunaLua?
For some reason this refused to work before. Or maybe just doesn't accept soundfiles from the default sound folder.Kevsoft wrote: Yes! It's the same as Autocode handle it.
Put you sound file in the custom folder and call:Code: Select all
playSFX("your_sound_file.mp3")
Let's say I want to make the player slower as the time goes on. I guess I would create a timer, make several ifs that do a thing, when the timer reaches certain points. It's just that I don't know what to do with speedX and speedY.Kevsoft wrote: What do you mean with "default"? You might wanna just print out your current speed as text.
I'd say so, especially now that LunaDLL has the variable bank and LunaLua makes it much easier to do more complex stuff. But some folks can be pretty resistant to learning how to code, and to be fair it's pretty intimidating when you first start out. We're hoping that expanding LunaLua will encourage folks to try, though. Oddwrath's suggestion earlier to make a conversion guide is a good idea too, that's one of the things that helped me switch from Drag & Drop to GML with GameMaker.TiKi wrote:Is it fair to suggest someone use lunadll to make a gimmick work better (such as global variables instead of stars) when that majorly improves or makes possible a gimmick (like a switch palace)? Cause it's bugging me out how people still suggest SMW stars these days as global stuff
We be workin' on these. The cinematX library is being written to help with cutscenes, bosses and other scripted sequences (including HP bars and other types of progress gauges), and Kil's working on custom sprite and GUI frameworks which I will most likely incorporate into cinematX whenever he's done with them. But please be courteous and don't bother him about those, the guy's put up with a lot of stuff from us already.LukasSMBX wrote:Is it possible to make a boss hp bar? that really goes down when hitting a boom boom for example?
I'd try that, but I want to keep the bounce that the green spiny egg has when it lands.TiKi wrote:You could replace it with like a spiny or sidestepper (crab) with changing npc id. That would be the easiest solution.
You could change the horizontal speed of the NPC to 0, and control its horizontal movement entirely with LunaDLL.Karatekid5 wrote:I'd try that, but I want to keep the bounce that the green spiny egg has when it lands.TiKi wrote:You could replace it with like a spiny or sidestepper (crab) with changing npc id. That would be the easiest solution.
That'd probably be the best idea. Though, how would I have it check which direction it was thrown in?Hoeloe wrote:You could change the horizontal speed of the NPC to 0, and control its horizontal movement entirely with LunaDLL.
IDK if it works,but maybe before you set the hspeed to 0,let lunadll check the hspeed,so you can get the direction.Karatekid5 wrote:That'd probably be the best idea. Though, how would I have it check which direction it was thrown in?Hoeloe wrote:You could change the horizontal speed of the NPC to 0, and control its horizontal movement entirely with LunaDLL.
I'm not sure that's true. PlaceSprite has a setting to place in world coordinates (it's under the "sprite type" argument, but I can't remember the number). If you set the duration to 2, this should allow you to place sprites at the player's location.Rockythechao wrote:Not yet, you'll have to use an NPC for the time being.