Re: Need help with lua? - LunaLua General Help
Posted: Mon Sep 05, 2016 8:44 am
Those were probably deleted by your AntiVirus. You can probably download them somewhere
Forums for SMBX
https://www.smbxgame.com/forums/
Run vcredist_86.exeWorld Star 9 wrote:I still have an error issue :(
When I open the software it says "The application was unable to start correctly (0xc000007b). Click OK to close the application"
It is not just Peach. Any character can do that. Speed has nothing to do with it. Just have 2 or three hearts with Peach or Toad, then let go of what ever they are holding while facing left. If the ceiling is low enough, you can get the item to clip into the wall... 999,999 times out of a million, it does not help the player though. Usually the opposite. Only one screen puzzles can utilize that glitch, or anytime a warp does not allow items, but warps to the left on the exact set up you had their. An easy fix is to raise the ceiling by 32 pixels, or 64 in terms of the larger items. Depends on the item. I do not think lua can fix that.Reign wrote:Could there be a way to prevent the Peach throwing bug with Lunalua (for example if the speed of the key/mushroom block is too high, it will be destroyed)?
I mean the kind of situation like in this video at 33:57 where the npc gets thrown through the wall.
https://www.youtube.com/watch?v=3D3Frgh6t3I
You could always find a way to check if the object is fully colliding with a wall on all sides and then destroy it if it is. As you mentioned, there might be a way to check speed if it's faster than throwing it. Either way you can use NPC:kill() to destroy itReign wrote:Could there be a way to prevent the Peach throwing bug with Lunalua (for example if the speed of the key/mushroom block is too high, it will be destroyed)?
I mean the kind of situation like in this video at 33:57 where the npc gets thrown through the wall.
https://www.youtube.com/watch?v=3D3Frgh6t3I
Thanks, this sounds like the most sensible route to go. I'm really unfamiliar with the collision detection though, any pointers how to get started?PixelPest wrote:You could always find a way to check if the object is fully colliding with a wall on all sides and then destroy it if it is.
By the way, it only works right to left.Reign wrote:Thanks, this sounds like the most sensible route to go. I'm really unfamiliar with the collision detection though, any pointers how to get started?PixelPest wrote:You could always find a way to check if the object is fully colliding with a wall on all sides and then destroy it if it is.
And Mech, considering the levels are one screen in size (there is very limited space that you have to utilize well) and you can jump, I'm not sure if raising the ceiling is a working solution here.
Code in the LunaLUA language. There is a website that keeps archives of each field. Here is the link: http://wohlsoft.ru/pgewiki/Category:LunaLua_APIWorld Star 9 wrote:Finally! It works!
Thank you PixelPest and Enjl!
EDIT: I got the modified smbx application to work, I just have one question? Where is the Lunalua software?
Code: Select all
Graphics.drawImage(gfx, player.x, player.y)
MECHDRAGON777 wrote:
Peach Spin-jump
Code: Select all
function onInputUpdate() if player.altJumpKeyPressing == true and player:mem(0x12E, FIELD_WORD) == 0 and (player:mem(0x146, FIELD_WORD) ~= 0 or player:mem(0x48, FIELD_WORD) ~= 0 or player:mem(0x176, FIELD_WORD) ~= 0) then player:mem(0x50, FIELD_WORD, -1) local myTailSound = Audio.SfxOpen("tail.ogg") Audio.sounds[1].sfx = myTailSound end if player.jumpKeyPressing == true then Audio.sounds[1].sfx = nil end end
Make the star friendly and make it unfriendly once your level starts. Also make sure you're using PGE to save your levels.Reign wrote:Is there a way to get rid of the 0/1 text when standing next to a door that leads to a level that has a star? I don't want to make the whole font invisible.
Also, with that code, you need to copy the sound effect from ../SMBX/sound into your custom graphics folder.Art wrote:I was wondering if someone here could help me. I found a code by MECHDRAGON777 that should make Peach spin-jump, but I don't understand how to get it to load, I've been trying for the past couple of hours, but I just don't seem to get it. Can someone tell me what I need to put in the lunaworld.lua file to get this to load?
MECHDRAGON777 wrote:
Peach Spin-jump
Code: Select all
function onInputUpdate() if player.altJumpKeyPressing == true and player:mem(0x12E, FIELD_WORD) == 0 and (player:mem(0x146, FIELD_WORD) ~= 0 or player:mem(0x48, FIELD_WORD) ~= 0 or player:mem(0x176, FIELD_WORD) ~= 0) then player:mem(0x50, FIELD_WORD, -1) local myTailSound = Audio.SfxOpen("tail.ogg") Audio.sounds[1].sfx = myTailSound end if player.jumpKeyPressing == true then Audio.sounds[1].sfx = nil end end