This is the place for discussion and support for LunaLua and related modifications and libraries.
Moderator: Userbase Moderators
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?
|
|
|
|
-
PixelPest
- Link

- Posts: 7111
- Joined: Sun Jul 12, 2015 5:38 pm
- Flair: Tamer of Boom Booms
-
Contact:
Postby PixelPest » Wed Sep 21, 2016 7:53 am
MECHDRAGON777 wrote: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
Also, with that code, you need to copy the sound effect from ../SMBX/sound into your custom graphics folder.
Why not just use playSFX()? Also, you don't need to test for true. (y==true is the same as y)
|
|
|
|
|
|
|
|
|
-
Emral
- Cute Yoshi Egg

- Posts: 9890
- Joined: Mon Jan 20, 2014 12:58 pm
- Flair: Phoenix
Postby Emral » Thu Sep 22, 2016 9:02 am
I've heard claims that this topic doesn't do a good job at telling people how to get lunalua installed and running properly, so here's a step by step in case you're having trouble:
1)
Enjl wrote:Go to http://wohlsoft.ru/LunaLua/ and follow the download instructions. Selecting "Vanilla + Launcher" should work in most cases. If not, try "Hexed".
Make sure you download the latest build. After downloading you should be greeted with a zip like this:
2a)
Enjl wrote:Extract the contents of the zip into your smbx directory
OR 2b)
Enjl wrote:create a new one if you ticked "Include standalone base game"
Tadaa! After completing these steps your SMBX will be lua-compatible and you can take a look at the documentation or join the codehaus discord to get started in writing your own code!
Hope that cleared things up for you,
Supershroom wrote:pal.
|
|
|
|
|
|
|
|
|
-
Cedur
- Link

- Posts: 7073
- Joined: Tue Jun 28, 2016 10:14 am
- Flair: I'm gone, for chess and minesweeper
- Pronouns: he/him
Postby Cedur » Thu Sep 22, 2016 9:20 am
I primarily don't need it yet for own level design, I need it to have my game engine lua-compatible so it can deal with lua-stuff like it e.g. appears in Tower of Biased X (when playing ToB X without Lua, you get runtime errors everywhere). I also have an application file called "LunaLoader" in my folder which doesn't appear in screenie 1), and I can't open it.
I'm also trying to install SMBX 2.0, that will maybe work out.
|
|
|
|
|
|
|
|
|
-
Emral
- Cute Yoshi Egg

- Posts: 9890
- Joined: Mon Jan 20, 2014 12:58 pm
- Flair: Phoenix
Postby Emral » Thu Sep 22, 2016 9:34 am
LunaLoader is further offscreen. You should be able to run the SMBX.exe which comes with the zip, though. That one's lua-compatible too.
As for 2.0, it might be better to wait for Beta 3 at this stage. We're aiming for a release VERY soon, so if you can hold out for a few days you can get the most recent lua + 2.0 all in one package.
|
|
|
|
|
|
|
|
|
-
Reign
- Chain Chomp

- Posts: 327
- Joined: Tue Jan 21, 2014 4:22 am
Postby Reign » Thu Sep 29, 2016 12:41 pm
I have gotten this error three times now testing my episode (in different levels).
It always seems to happen after I've had a big amount of deaths and occurs when the level is restarting. How should I start finding the cause of this?
EDIT: And this one which I think started occuring once I added custom player characters, but not sure.
**************************************************
* Summary *
**************************************************
SMBX has crashed due an error. See the description for more information!
LunaLua Version: LUNALUA V0.7.3.0 BETA
Time/Date: 2016-09-15 19 52 38
**************************************************
* Description *
**************************************************
Exception code: 0xc000008f
VB6 Error Code: 424
VB6 Error Name: Unknown
If you like to help us finding the error then please post this log at:
* http://engine.wohlnet.ru/forum/ or
* http://www.smbxgame.com/forums/v ... m.php?f=35 or
* http://talkhaus.raocow.com/viewforum.php?f=36
**************************************************
* Stacktrace *
**************************************************
**** LIBRARY INFORMATION ****
SymInit: Symbol-SearchPath: '.;C:\Games\SMBX with LUNA;C:\Games\SMBX with LUNA;C:\Windows;C:\Windows\system32;SRV*C:\websymbols* http://msdl.microsoft.com/download/symbols;', symOptions: 530, UserName: 'Sami'
OS-Version: 6.1.7601 (Service Pack 1) 0x100-0x1
C:\Games\SMBX with LUNA\smbx.legacy:smbx.legacy (00400000), size: 7626752 (result: 0), SymType: '-nosymbols-', PDB: 'C:\Games\SMBX with LUNA\smbx.legacy', fileVersion: 1.3.0.1
C:\Windows\SysWOW64\ntdll.dll:ntdll.dll (77190000), size: 1572864 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SysWOW64\ntdll.dll', fileVersion: 6.1.7601.23418
C:\Windows\syswow64\kernel32.dll:kernel32.dll (753B0000), size: 1114112 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\kernel32.dll', fileVersion: 6.1.7601.23418
C:\Program Files (x86)\AVG\Av\avghookx.dll:avghookx.dll (741B0000), size: 192512 (result: 0), SymType: '-nosymbols-', PDB: 'C:\Program Files (x86)\AVG\Av\avghookx.dll', fileVersion: 16.111.0.7797
C:\Windows\syswow64\KERNELBASE.dll:KERNELBASE.dll (75AD0000), size: 290816 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\KERNELBASE.dll', fileVersion: 6.1.7601.23418
C:\Windows\system32\MSVBVM60.DLL:MSVBVM60.DLL (72940000), size: 1388544 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\MSVBVM60.DLL', fileVersion: 6.0.98.15
C:\Windows\syswow64\USER32.dll:USER32.dll (754F0000), size: 1048576 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\USER32.dll', fileVersion: 6.1.7601.19061
C:\Windows\syswow64\GDI32.dll:GDI32.dll (76A20000), size: 589824 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\GDI32.dll', fileVersion: 6.1.7601.23457
C:\Windows\syswow64\LPK.dll:LPK.dll (74B00000), size: 40960 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\LPK.dll', fileVersion: 6.1.7601.23453
C:\Windows\syswow64\USP10.dll:USP10.dll (75A30000), size: 643072 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\USP10.dll', fileVersion: 1.626.7601.19054
C:\Windows\syswow64\msvcrt.dll:msvcrt.dll (74B40000), size: 704512 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\msvcrt.dll', fileVersion: 7.0.7601.17744
C:\Windows\syswow64\ADVAPI32.dll:ADVAPI32.dll (75140000), size: 659456 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\ADVAPI32.dll', fileVersion: 6.1.7601.23418
C:\Windows\SysWOW64\sechost.dll:sechost.dll (75390000), size: 102400 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SysWOW64\sechost.dll', fileVersion: 6.1.7601.18869
C:\Windows\syswow64\RPCRT4.dll:RPCRT4.dll (75940000), size: 983040 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\RPCRT4.dll', fileVersion: 6.1.7601.23497
C:\Windows\syswow64\SspiCli.dll:SspiCli.dll (74AA0000), size: 393216 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\SspiCli.dll', fileVersion: 6.1.7601.23497
C:\Windows\syswow64\CRYPTBASE.dll:CRYPTBASE.dll (74A90000), size: 49152 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\CRYPTBASE.dll', fileVersion: 6.1.7601.23497
C:\Windows\syswow64\ole32.dll:ole32.dll (76C30000), size: 1429504 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\ole32.dll', fileVersion: 6.1.7601.23392
C:\Windows\syswow64\OLEAUT32.dll:OLEAUT32.dll (76AB0000), size: 585728 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\OLEAUT32.dll', fileVersion: 6.1.7601.19144
C:\Windows\system32\IMM32.DLL:IMM32.DLL (74C40000), size: 393216 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\IMM32.DLL', fileVersion: 6.1.7601.17514
C:\Windows\syswow64\MSCTF.dll:MSCTF.dll (75860000), size: 835584 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\MSCTF.dll', fileVersion: 6.1.7601.18731
C:\Games\SMBX with LUNA\LunaDll.dll:LunaDll.dll (599A0000), size: 2936832 (result: 0), SymType: '-exported-', PDB: 'C:\Games\SMBX with LUNA\LunaDll.dll', fileVersion: 0.7.3.0
C:\Windows\system32\VERSION.dll:VERSION.dll (749C0000), size: 36864 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\VERSION.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\WINMM.dll:WINMM.dll (741F0000), size: 204800 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\WINMM.dll', fileVersion: 6.1.7601.17514
C:\Windows\system32\dbghelp.dll:dbghelp.dll (70AB0000), size: 962560 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\dbghelp.dll', fileVersion: 6.1.7601.17514
C:\Windows\syswow64\WS2_32.dll:WS2_32.dll (74BF0000), size: 217088 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\WS2_32.dll', fileVersion: 6.1.7601.23451
C:\Windows\syswow64\NSI.dll:NSI.dll (75B70000), size: 24576 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\NSI.dll', fileVersion: 6.1.7600.16385
C:\Games\SMBX with LUNA\SDL2.dll:SDL2.dll (6C740000), size: 4546560 (result: 0), SymType: '-exported-', PDB: 'C:\Games\SMBX with LUNA\SDL2.dll', fileVersion: 2.0.4.0
C:\Games\SMBX with LUNA\libgcc_s_dw2-1.dll:libgcc_s_dw2-1.dll (6E940000), size: 143360 (result: 0), SymType: '-exported-', PDB: 'C:\Games\SMBX with LUNA\libgcc_s_dw2-1.dll'
C:\Games\SMBX with LUNA\libwinpthread-1.dll:libwinpthread-1.dll (64940000), size: 77824 (result: 0), SymType: '-exported-', PDB: 'C:\Games\SMBX with LUNA\libwinpthread-1.dll', fileVersion: 1.0.0.0
C:\Windows\syswow64\SHELL32.dll:SHELL32.dll (75DD0000), size: 12894208 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\SHELL32.dll', fileVersion: 6.1.7601.23418
C:\Windows\syswow64\SHLWAPI.dll:SHLWAPI.dll (74CC0000), size: 356352 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\SHLWAPI.dll', fileVersion: 6.1.7601.17514
C:\Games\SMBX with LUNA\SDL2_mixer_ext.dll:SDL2_mixer_ext.dll (66380000), size: 2465792 (result: 0), SymType: '-exported-', PDB: 'C:\Games\SMBX with LUNA\SDL2_mixer_ext.dll'
C:\Games\SMBX with LUNA\libstdc++-6.dll:libstdc++-6.dll (6FC40000), size: 995328 (result: 0), SymType: '-exported-', PDB: 'C:\Games\SMBX with LUNA\libstdc++-6.dll'
C:\Windows\system32\OPENGL32.dll:OPENGL32.dll (71060000), size: 819200 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\OPENGL32.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\GLU32.dll:GLU32.dll (71200000), size: 139264 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\GLU32.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\DDRAW.dll:DDRAW.dll (62F70000), size: 946176 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\DDRAW.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\DCIMAN32.dll:DCIMAN32.dll (67480000), size: 24576 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\DCIMAN32.dll', fileVersion: 6.1.7601.23453
C:\Windows\syswow64\SETUPAPI.dll:SETUPAPI.dll (751F0000), size: 1691648 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\SETUPAPI.dll', fileVersion: 6.1.7601.17514
C:\Windows\syswow64\CFGMGR32.dll:CFGMGR32.dll (757C0000), size: 159744 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\CFGMGR32.dll', fileVersion: 6.1.7601.17621
C:\Windows\syswow64\DEVOBJ.dll:DEVOBJ.dll (757F0000), size: 73728 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\DEVOBJ.dll', fileVersion: 6.1.7601.17621
C:\Windows\system32\dwmapi.dll:dwmapi.dll (722A0000), size: 77824 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\dwmapi.dll', fileVersion: 6.1.7601.18917
C:\Windows\system32\MSIMG32.dll:MSIMG32.dll (74850000), size: 20480 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\MSIMG32.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\api-ms-win-core-synch-l1-2-0.DLL:api-ms-win-core-synch-l1-2-0.DLL (714B0000), size: 12288 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\api-ms-win-core-synch-l1-2-0.DLL', fileVersion: 10.0.10586.9
C:\Windows\system32\uxtheme.dll:uxtheme.dll (722C0000), size: 524288 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\uxtheme.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\atiglpxx.dll:atiglpxx.dll (71290000), size: 86016 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\atiglpxx.dll', fileVersion: 8.14.1.6463
C:\Windows\system32\atioglxx.dll:atioglxx.dll (52970000), size: 25911296 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\atioglxx.dll', fileVersion: 6.14.10.13399
C:\Windows\system32\atiadlxy.dll:atiadlxy.dll (70CE0000), size: 987136 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\atiadlxy.dll', fileVersion: 7.15.20.1301
C:\Windows\system32\PROPSYS.dll:PROPSYS.dll (70DE0000), size: 1003520 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\PROPSYS.dll', fileVersion: 7.0.7601.17514
C:\Windows\syswow64\USERENV.dll:USERENV.dll (74B20000), size: 94208 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\USERENV.dll', fileVersion: 6.1.7601.17514
C:\Windows\syswow64\profapi.dll:profapi.dll (75930000), size: 45056 (result: 0), SymType: '-nosymbols-', PDB: 'C:\Windows\syswow64\profapi.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\WTSAPI32.dll:WTSAPI32.dll (73320000), size: 53248 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\WTSAPI32.dll', fileVersion: 6.1.7601.17514
C:\Windows\syswow64\PSAPI.DLL:PSAPI.DLL (75820000), size: 20480 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\PSAPI.DLL', fileVersion: 6.1.7600.16385
C:\Windows\system32\IPHLPAPI.DLL:IPHLPAPI.DLL (73550000), size: 114688 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\IPHLPAPI.DLL', fileVersion: 6.1.7601.17514
C:\Windows\system32\WINNSI.DLL:WINNSI.DLL (74170000), size: 28672 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\WINNSI.DLL', fileVersion: 6.1.7600.16385
C:\Windows\syswow64\WINTRUST.dll:WINTRUST.dll (754C0000), size: 192512 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\WINTRUST.dll', fileVersion: 6.1.7601.18839
C:\Windows\syswow64\CRYPT32.dll:CRYPT32.dll (75010000), size: 1183744 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\CRYPT32.dll', fileVersion: 6.1.7601.18839
C:\Windows\syswow64\MSASN1.dll:MSASN1.dll (75B80000), size: 49152 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\MSASN1.dll', fileVersion: 6.1.7601.17514
C:\Windows\system32\atigktxx.dll:atigktxx.dll (711D0000), size: 159744 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\atigktxx.dll', fileVersion: 8.14.1.6463
C:\Windows\system32\SXS.DLL:SXS.DLL (6F7D0000), size: 389120 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\SXS.DLL', fileVersion: 6.1.7601.17514
C:\Windows\system32\apphelp.dll:apphelp.dll (72AE0000), size: 311296 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\apphelp.dll', fileVersion: 6.1.7601.19050
C:\Windows\system32\CRYPTSP.dll:CRYPTSP.dll (720A0000), size: 94208 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\CRYPTSP.dll', fileVersion: 6.1.7601.18741
C:\Windows\system32\rsaenh.dll:rsaenh.dll (72060000), size: 241664 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\rsaenh.dll', fileVersion: 6.1.7600.16385
C:\Windows\syswow64\CLBCatQ.DLL:CLBCatQ.DLL (74F70000), size: 536576 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\CLBCatQ.DLL', fileVersion: 2001.12.8530.16385
C:\Windows\SysWOW64\ieframe.dll:ieframe.dll (6B310000), size: 13828096 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SysWOW64\ieframe.dll', fileVersion: 11.0.9600.18427
C:\Windows\syswow64\api-ms-win-downlevel-advapi32-l1-1-0.dll:api-ms-win-downlevel-advapi32-l1-1-0.dll (74C30000), size: 20480 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\api-ms-win-downlevel-advapi32-l1-1-0.dll', fileVersion: 6.2.9200.16492
C:\Windows\syswow64\api-ms-win-downlevel-shlwapi-l1-1-0.dll:api-ms-win-downlevel-shlwapi-l1-1-0.dll (74B10000), size: 16384 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\api-ms-win-downlevel-shlwapi-l1-1-0.dll', fileVersion: 6.2.9200.16492
C:\Windows\syswow64\api-ms-win-downlevel-user32-l1-1-0.dll:api-ms-win-downlevel-user32-l1-1-0.dll (75000000), size: 16384 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\api-ms-win-downlevel-user32-l1-1-0.dll', fileVersion: 6.2.9200.16492
C:\Windows\SysWOW64\api-ms-win-downlevel-shell32-l1-1-0.dll:api-ms-win-downlevel-shell32-l1-1-0.dll (6EE50000), size: 16384 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SysWOW64\api-ms-win-downlevel-shell32-l1-1-0.dll', fileVersion: 6.2.9200.16492
C:\Windows\syswow64\api-ms-win-downlevel-version-l1-1-0.dll:api-ms-win-downlevel-version-l1-1-0.dll (75810000), size: 16384 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\api-ms-win-downlevel-version-l1-1-0.dll', fileVersion: 6.2.9200.16492
C:\Windows\syswow64\api-ms-win-downlevel-normaliz-l1-1-0.dll:api-ms-win-downlevel-normaliz-l1-1-0.dll (77160000), size: 12288 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\api-ms-win-downlevel-normaliz-l1-1-0.dll', fileVersion: 6.2.9200.16492
C:\Windows\syswow64\normaliz.DLL:normaliz.DLL (74CA0000), size: 12288 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\normaliz.DLL', fileVersion: 6.1.7600.16385
C:\Windows\syswow64\iertutil.dll:iertutil.dll (75B90000), size: 2310144 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\iertutil.dll', fileVersion: 11.0.9600.18427
C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.18837_none_41e855142bd5705d\comctl32.dll:comctl32.dll (72440000), size: 1695744 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.18837_none_41e855142bd5705d\comctl32.dll', fileVersion: 6.10.7601.18837
C:\Windows\system32\api-ms-win-downlevel-shlwapi-l2-1-0.dll:api-ms-win-downlevel-shlwapi-l2-1-0.dll (74840000), size: 16384 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\api-ms-win-downlevel-shlwapi-l2-1-0.dll', fileVersion: 6.2.9200.16492
C:\Windows\syswow64\api-ms-win-downlevel-ole32-l1-1-0.dll:api-ms-win-downlevel-ole32-l1-1-0.dll (74CB0000), size: 16384 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\api-ms-win-downlevel-ole32-l1-1-0.dll', fileVersion: 6.2.9200.16492
C:\Windows\syswow64\urlmon.dll:urlmon.dll (755F0000), size: 1359872 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\urlmon.dll', fileVersion: 11.0.9600.18427
C:\Windows\syswow64\WININET.dll:WININET.dll (74D20000), size: 2424832 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\WININET.dll', fileVersion: 11.0.9600.18427
C:\Windows\system32\Secur32.dll:Secur32.dll (74260000), size: 32768 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\Secur32.dll', fileVersion: 6.1.7601.23497
C:\Windows\system32\api-ms-win-downlevel-advapi32-l2-1-0.dll:api-ms-win-downlevel-advapi32-l2-1-0.dll (740E0000), size: 16384 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\api-ms-win-downlevel-advapi32-l2-1-0.dll', fileVersion: 6.2.9200.16492
C:\Windows\system32\mswsock.dll:mswsock.dll (735C0000), size: 245760 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\mswsock.dll', fileVersion: 6.1.7601.23451
C:\Windows\System32\wship6.dll:wship6.dll (74180000), size: 24576 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\wship6.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\DNSAPI.dll:DNSAPI.dll (73570000), size: 278528 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\DNSAPI.dll', fileVersion: 6.1.7601.17570
C:\Windows\System32\netprofm.dll:netprofm.dll (74080000), size: 368640 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\netprofm.dll', fileVersion: 6.1.7600.16385
C:\Windows\System32\nlaapi.dll:nlaapi.dll (74070000), size: 65536 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\nlaapi.dll', fileVersion: 6.1.7601.18685
C:\Windows\system32\dhcpcsvc6.DLL:dhcpcsvc6.DLL (6F0D0000), size: 53248 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\dhcpcsvc6.DLL', fileVersion: 6.1.7601.17970
C:\Windows\System32\wshtcpip.dll:wshtcpip.dll (74190000), size: 20480 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\wshtcpip.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\rasadhlp.dll:rasadhlp.dll (73540000), size: 24576 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\rasadhlp.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\dhcpcsvc.DLL:dhcpcsvc.DLL (6F0B0000), size: 73728 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\dhcpcsvc.DLL', fileVersion: 6.1.7600.16385
C:\Windows\system32\RpcRtRemote.dll:RpcRtRemote.dll (749B0000), size: 57344 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\RpcRtRemote.dll', fileVersion: 6.1.7601.17514
C:\Windows\System32\npmproxy.dll:npmproxy.dll (73300000), size: 32768 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\npmproxy.dll', fileVersion: 6.1.7600.16385
C:\Windows\SysWOW64\mshtml.dll:mshtml.dll (070E0000), size: 21430272 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SysWOW64\mshtml.dll', fileVersion: 11.0.9600.18427
C:\Windows\system32\MLANG.dll:MLANG.dll (6EE00000), size: 188416 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\MLANG.dll', fileVersion: 6.1.7600.16385
C:\Windows\System32\fwpuclnt.dll:fwpuclnt.dll (734F0000), size: 229376 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\fwpuclnt.dll', fileVersion: 6.1.7601.18283
C:\Windows\system32\d2d1.dll:d2d1.dll (62740000), size: 3436544 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\d2d1.dll', fileVersion: 6.2.9200.16765
C:\Windows\system32\DWrite.dll:DWrite.dll (62400000), size: 1269760 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\DWrite.dll', fileVersion: 6.2.9200.17568
C:\Windows\system32\dxgi.dll:dxgi.dll (623B0000), size: 311296 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\dxgi.dll', fileVersion: 6.2.9200.16492
C:\Windows\system32\d3d11.dll:d3d11.dll (62230000), size: 1527808 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\d3d11.dll', fileVersion: 6.2.9200.16570
C:\Windows\system32\msimtf.dll:msimtf.dll (68DB0000), size: 45056 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\msimtf.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\msls31.dll:msls31.dll (71020000), size: 200704 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\msls31.dll', fileVersion: 3.10.349.0
C:\Windows\system32\windowscodecs.dll:windowscodecs.dll (702D0000), size: 1249280 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\windowscodecs.dll', fileVersion: 6.2.9200.21830
C:\Windows\system32\ntmarta.dll:ntmarta.dll (72260000), size: 135168 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\ntmarta.dll', fileVersion: 6.1.7600.16385
C:\Windows\syswow64\WLDAP32.dll:WLDAP32.dll (75B20000), size: 282624 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\syswow64\WLDAP32.dll', fileVersion: 6.1.7601.17514
C:\Windows\system32\asycfilt.dll:asycfilt.dll (71270000), size: 81920 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\asycfilt.dll', fileVersion: 6.1.7601.19144
C:\Windows\system32\DINPUT.DLL:DINPUT.DLL (70FF0000), size: 151552 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\DINPUT.DLL', fileVersion: 6.1.7600.16385
C:\Windows\system32\HID.DLL:HID.DLL (61A90000), size: 36864 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\HID.DLL', fileVersion: 6.1.7600.16385
C:\Windows\system32\DSOUND.DLL:DSOUND.DLL (71130000), size: 466944 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\DSOUND.DLL', fileVersion: 6.1.7600.16385
C:\Windows\system32\POWRPROF.dll:POWRPROF.dll (70C60000), size: 151552 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\POWRPROF.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\MMDevAPI.DLL:MMDevAPI.DLL (6F6C0000), size: 233472 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\MMDevAPI.DLL', fileVersion: 6.1.7601.17514
C:\Windows\system32\wdmaud.drv:wdmaud.drv (712B0000), size: 196608 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\wdmaud.drv', fileVersion: 6.1.7601.17514
C:\Windows\system32\ksuser.dll:ksuser.dll (74640000), size: 16384 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\ksuser.dll', fileVersion: 6.1.7601.19091
C:\Windows\system32\AVRT.dll:AVRT.dll (70560000), size: 28672 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\AVRT.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\AUDIOSES.DLL:AUDIOSES.DLL (66BC0000), size: 221184 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\AUDIOSES.DLL', fileVersion: 6.1.7601.18741
C:\Windows\system32\msacm32.drv:msacm32.drv (745F0000), size: 32768 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\msacm32.drv', fileVersion: 6.1.7600.16385
C:\Windows\system32\MSACM32.dll:MSACM32.dll (74140000), size: 81920 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\MSACM32.dll', fileVersion: 6.1.7600.16385
C:\Windows\system32\midimap.dll:midimap.dll (74610000), size: 28672 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\midimap.dll', fileVersion: 6.1.7600.16385
**** THE STACKTRACE ****
0: 72A0E246 (MSVBVM60): (filename not available): rtcDoEvents
USERNAME:
(NONE)
USERCOMMENT:
(NONE)
|
|
|
|
|
|
|
|
|
-
Reign
- Chain Chomp

- Posts: 327
- Joined: Tue Jan 21, 2014 4:22 am
Postby Reign » Mon Oct 03, 2016 11:56 am
The above problem was solved by removing the custom player character graphics. However, now I'm facing a new issue.
This error appears when starting any level that uses Healthpoint.lua.
Here is the actual healthpoint.lua (I copied the one that came with SMBX 2.0 Beta 3 but the same error appeared with the older version of this file). It's probably better to check this in your own SMBX if you have BETA 3 since you can see the line numbers:
-- HealthPoint
-- Made by WasabiJellyfish
-- v1.0.3
local HealthPoint = {}
local pNPC = loadSharedAPI("pnpc")
local graphX = loadSharedAPI("graphX")
local colliders = loadSharedAPI("colliders")
function HealthPoint.onInitAPI() --Is called when the api is loaded by loadAPI.
registerEvent(HealthPoint, "onLoop", "assign", true) --Register the loop event
registerEvent(HealthPoint, "onNPCKill", "onNPCKill", true) --Register the damage event
end
----------------------------------------------------------------------------------------------
--- DOCUMENTATION AND FUNCTIONS ---
----------------------------------------------------------------------------------------------
--[[
Damage types
1 = jump
2 = spinjump
3 = fireball
4 = hammer
5 = shell
6 = tail
7 = link
8 = thrown
9 = boomerang
10 = peachbomb
11 = swordbeam
12 = linkfire
13 = iceblock
14 = yoshifire
15 = yoshiice
HealthPoint.setNPCHealth(id, healthamount)
HealthPoint.setNPCDamage(id, damagetype, damageamount)
HealthPoint.setGlobalDamage(damagetype, damageamount)
HealthPoint.makeNPCInvincible(id)
HealthPoint.makeNPCNormal(id)
--]]
----------------------------------------------------------------------------------------------
--- THE ACTUAL CODE STUFF ---
----------------------------------------------------------------------------------------------
local bingo = {1, 2, 3, 4, 5, 6, 7, 8, 12, 15, 17, 18, 19, 20, 23, 24, 25, 27, 28, 29, 36, 37, 38, 39, 42, 43, 44, 47, 48, 49, 50, 51, 52, 53, 54, 55, 59, 61, 63, 65, 71, 72, 73, 74, 76, 77, 86, 89, 93, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 135, 136, 137, 161, 162, 163, 164, 165, 166, 167, 168, 172, 173, 174, 175, 176, 177, 180, 189, 194, 195, 199, 200, 201, 203, 204, 205, 206, 207, 208, 209, 210, 229, 230, 231, 232, 233, 234, 235, 236, 242, 243, 244, 245, 247, 256, 257, 261, 262, 263, 267, 268, 270, 271, 272, 275, 280, 281, 284, 285, 286}
-- Health --
-- Change these values corresponding to the id inside the [] to change the enemy's health --
HealthPoint.npcHealth = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.npcHealth, v, 3)
end
-- Jump Damage --
HealthPoint.jumpDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.jumpDamage, v, 1)
end
-- Spinjump Damage --
HealthPoint.spinjumpDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.spinjumpDamage, v, 1)
end
-- Fireball Damage --
HealthPoint.fireballDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.fireballDamage, v, 1)
end
-- Hammer Damage --
HealthPoint.hammerDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.hammerDamage, v, 1)
end
-- Projectile Damage --
HealthPoint.projectileDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.projectileDamage, v, 1)
end
-- Tail Damage --
HealthPoint.tailDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.tailDamage, v, 1)
end
-- Link Attack Damage --
HealthPoint.linkDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.linkDamage, v, 1)
end
-- Thrown Damage --
HealthPoint.thrownDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.thrownDamage, v, 1)
end
-- Boomerang Damage--
HealthPoint.boomerangDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.boomerangDamage, v, 1)
end
HealthPoint.peachbombDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.peachbombDamage, v, 1)
end
HealthPoint.swordbeamDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.swordbeamDamage, v, 1)
end
HealthPoint.yoshifireDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.yoshifireDamage, v, 1)
end
HealthPoint.iceblockDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.iceblockDamage, v, 1)
end
HealthPoint.linkfireDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.linkfireDamage, v, 1)
end
HealthPoint.yoshiiceDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.yoshiiceDamage, v, 1)
end
----------------------------------------------------------------------------------------------
--- THE ACTUAL CODE STUFF ---
----------------------------------------------------------------------------------------------
damevaeg = {}
damevaeg[1] = HealthPoint.jumpDamage
damevaeg[2] = HealthPoint.spinjumpDamage
damevaeg[3] = HealthPoint.fireballDamage
damevaeg[4] = HealthPoint.hammerDamage
damevaeg[5] = HealthPoint.projectileDamage
damevaeg[6] = HealthPoint.tailDamage
damevaeg[7] = HealthPoint.linkDamage
damevaeg[8] = HealthPoint.thrownDamage
damevaeg[9] = HealthPoint.boomerangDamage
damevaeg[10] = HealthPoint.peachbombDamage
damevaeg[11] = HealthPoint.swordbeamDamage
damevaeg[12] = HealthPoint.linkfireDamage
damevaeg[13] = HealthPoint.iceblockDamage
damevaeg[14] = HealthPoint.yoshifireDamage
damevaeg[15] = HealthPoint.yoshiiceDamage
function HealthPoint.setNPCHealth(id, number)
HealthPoint.npcHealth[id] = number
end
function HealthPoint.setNPCDamage(id, cause, number)
damevaeg[cause][id] = number
end
function HealthPoint.setGlobalDamage(cause, number)
for l,_ in pairs(HealthPoint.npcHealth) do
damevaeg[cause][l] = number
end
end
function HealthPoint.makeNPCInvincible(id)
for r,_ in pairs(damevaeg) do
damevaeg[r][id] = 0
end
end
function HealthPoint.makeNPCNormal(NPCid)
table.remove(HealthPoint.npcHealth, NPCid)
for r,_ in pairs(damevaeg) do
table.remove(damevaeg[r], NPCid)
end
end
----------------------------------------------------------------------------------------------
--- DAMAGE INPUT ---
----------------------------------------------------------------------------------------------
function HealthPoint.onNPCKill(eventObj, killedNPC, killReason)
if killedNPC.id == 13 and killReason == 4 then
fire = true
hammer = false
shell = false
end
if HealthPoint.npcHealth[killedNPC.id] ~= nil then
local wrappedNPC = pNPC.wrap(killedNPC)
if colliders.collideNPC(wrappedNPC, 171) then
hammer = true
fire = false
shell = false
elseif colliders.collideNPC(wrappedNPC, 292) then
boomerang = true
hammer = false
fire = false
shell = false
elseif colliders.collideNPC(wrappedNPC, 108) then
yoshifire = true
hammer = false
fire = false
shell = false
elseif colliders.collideNPC (wrappedNPC, 263) then
Text.print ("ICE", 100, 100)
ice = true
shell = false
hammer = false
fire = false
elseif colliders.collideNPC (wrappedNPC, 291) then
peachbomb = true
shell = false
elseif colliders.collideNPC (wrappedNPC, 266) then
laser = true
shell = false
elseif colliders.collideNPC(wrappedNPC, 237) then
yoshiice = true
shell = false
else
shell = true
end
if wrappedNPC.data.hit == nil then
wrappedNPC.data.hit = 0
end
if HealthPoint.jumpDamage[wrappedNPC.id] == nil then
HealthPoint.jumpDamage[wrappedNPC.id] = 0
end
if HealthPoint.fireballDamage[wrappedNPC.id] == nil then
HealthPoint.fireballDamage[wrappedNPC.id] = 0
end
if HealthPoint.iceblockDamage[wrappedNPC.id] == nil then
HealthPoint.iceblockDamage[wrappedNPC.id] = 0
end
if HealthPoint.hammerDamage[wrappedNPC.id] == nil then
HealthPoint.hammerDamage[wrappedNPC.id] = 0
end
if HealthPoint.boomerangDamage[wrappedNPC.id] == nil then
HealthPoint.boomerangDamage[wrappedNPC.id] = 0
end
if HealthPoint.yoshifireDamage[wrappedNPC.id] == nil then
HealthPoint.yoshifireDamage[wrappedNPC.id] = 0
end
if HealthPoint.peachbombDamage[wrappedNPC.id] == nil then
HealthPoint.peachbombDamage[wrappedNPC.id] = 0
end
if HealthPoint.swordbeamDamage[wrappedNPC.id] == nil then
HealthPoint.swordbeamDamage[wrappedNPC.id] = 0
end
if HealthPoint.projectileDamage[wrappedNPC.id] == nil then
HealthPoint.projectileDamage[wrappedNPC.id] = 0
end
if HealthPoint.thrownDamage[wrappedNPC.id] == nil then
HealthPoint.thrownDamage[wrappedNPC.id] = 0
end
if HealthPoint.tailDamage[wrappedNPC.id] == nil then
HealthPoint.tailDamage[wrappedNPC.id] = 0
end
if HealthPoint.spinjumpDamage[wrappedNPC.id] == nil then
HealthPoint.spinjumpDamage[wrappedNPC.id] = 0
end
if HealthPoint.linkDamage[wrappedNPC.id] == nil then
HealthPoint.linkDamage[wrappedNPC.id] = 0
end
if HealthPoint.linkfireDamage[wrappedNPC.id] == nil then
HealthPoint.linkfireDamage[wrappedNPC.id] = 0
end
if wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.jumpDamage[wrappedNPC.id] and killReason == 1 then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.jumpDamage[wrappedNPC.id]
playSFX(2)
wrappedNPC.speedX = 0
elseif wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.fireballDamage[wrappedNPC.id] and killReason == 3 and fire then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.fireballDamage[wrappedNPC.id]
playSFX(3)
wrappedNPC.speedX = 0
fire = false
elseif wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.iceblockDamage[wrappedNPC.id] and killReason == 3 and ice then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.iceblockDamage[wrappedNPC.id]
playSFX(3)
wrappedNPC.speedX = 0
elseif wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.hammerDamage[wrappedNPC.id] and killReason == 3 and hammer then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.hammerDamage[wrappedNPC.id]
playSFX(3)
wrappedNPC.speedX = 0
elseif wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.boomerangDamage[wrappedNPC.id] and killReason == 3 and boomerang then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.boomerangDamage[wrappedNPC.id]
playSFX(3)
wrappedNPC.speedX = 0
elseif wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.yoshifireDamage[wrappedNPC.id] and killReason == 3 and yoshifire then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.yoshifireDamage[wrappedNPC.id]
playSFX(3)
wrappedNPC.speedX = 0
elseif wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.yoshifireDamage[wrappedNPC.id] and killReason == 3 and yoshiice then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.yoshiiceDamage[wrappedNPC.id]
playSFX(3)
wrappedNPC.speedX = 0
elseif wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.peachbombDamage[wrappedNPC.id] and killReason == 3 and peachbomb then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.peachbombDamage[wrappedNPC.id]
playSFX(3)
wrappedNPC.speedX = 0
elseif wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.swordbeamDamage[wrappedNPC.id] and killReason == 10 and laser then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.swordbeamDamage[wrappedNPC.id]
playSFX(89)
wrappedNPC.speedX = 0
elseif wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.projectileDamage[wrappedNPC.id] and killReason == 3 and shell and not fire and not ice then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.projectileDamage[wrappedNPC.id]
playSFX(3)
wrappedNPC.speedX = 0
shell = false
elseif wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.thrownDamage[wrappedNPC.id] and (killReason == 4 or killReason == 5) then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.thrownDamage[wrappedNPC.id]
elseif wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.tailDamage[wrappedNPC.id] and killReason == 7 then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.tailDamage[wrappedNPC.id]
playSFX(3)
wrappedNPC.speedX = 0
elseif wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.spinjumpDamage[wrappedNPC.id] and killReason == 8 then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.spinjumpDamage[wrappedNPC.id]
playSFX(2)
wrappedNPC.speedX = 0
elseif wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.linkDamage[wrappedNPC.id] and killReason == 10 and not fire then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.linkDamage[wrappedNPC.id]
playSFX(89)
wrappedNPC.speedX = 0
elseif wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.linkfireDamage[wrappedNPC.id] and killReason == 10 and fire then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.linkfireDamage[wrappedNPC.id]
playSFX(89)
wrappedNPC.speedX = 0
end
end
end
----------------------------------------------------------------------------------------------
--- HEALTH ASSIGNMENT ---
----------------------------------------------------------------------------------------------
function HealthPoint.assign()
for k,v in pairs(NPC.get()) do
local n = pNPC.wrap(v);
if n.data.hit == nil then
if HealthPoint.npcHealth[n.id] ~= nil then
n.data.hit = HealthPoint.npcHealth[n.id]
end
end
if n.data.hp == nil then
if HealthPoint.npcHealth[n.id] ~= nil then
n.data.hp = HealthPoint.npcHealth[n.id]
end
end
if n.data.hpmax == nil then
if HealthPoint.npcHealth[n.id] ~= nil then
n.data.hpmax = HealthPoint.npcHealth[n.id]
end
end
if n ~= nil and HealthPoint.healthbar then
if n:mem(0x12A, FIELD_WORD) ~= 0 and n.data.hp ~= nil then
graphX.boxLevel (n.x-8,n.y-6, 32, 8, 0xFFFFFFF55)
graphX.boxLevel (n.x-7,n.y-5, 30, 6, 0x00000055)
graphX.boxLevel (n.x-7,n.y-5, n.data.hp/n.data.hpmax*30, 6, 0xFFF05BFF)
graphX.boxLevel (n.x-7,n.y-5, n.data.hit/n.data.hpmax*30, 6, 0xF61818FF)
end
end
if n.data.hp ~= nil then
if n.data.hp > n.data.hit then
n.data.hp = n.data.hp -0.02
end
if n.data.hit > n.data.hpmax then
n.data.hit = n.data.hpmax
end
end
end
end
return HealthPoint
And here is my lunadll.lua for the level:
local health = loadAPI("HealthPoint")
health.setNPCHealth(89, 2)
health.setNPCHealth(132, 1)
health.setNPCHealth(37, 5000)
function onLoad()
player:mem(0xF0, FIELD_WORD, 1)
end
function onKeyDown(keycode)
if (keycode == KEY_SEL) then
player:kill()
end
end
function onInputUpdate()
if(player.altJumpKeyPressing) then
player.altJumpKeyPressing = false;
player.jumpKeyPressing = true;
end
end
function onStart()
mem(0x00B2C5AC,FIELD_FLOAT,99)
end
I did not have this problem on the previous version of SMBX2.
|
|
|
|
|
|
|
|
|
-
loop
- Ninji

- Posts: 984
- Joined: Sun Apr 17, 2016 5:56 pm
- Flair: i may be dumb but im not stupid!
- Pronouns: he/him/they
Postby loop » Mon Oct 03, 2016 12:02 pm
Reign wrote:The above problem was solved by removing the custom player character graphics. However, now I'm facing a new issue.
This error appears when starting any level that uses Healthpoint.lua.
Here is the actual healthpoint.lua (I copied the one that came with SMBX 2.0 Beta 3 but the same error appeared with the older version of this file). It's probably better to check this in your own SMBX if you have BETA 3 since you can see the line numbers:
-- HealthPoint
-- Made by WasabiJellyfish
-- v1.0.3
local HealthPoint = {}
local pNPC = loadSharedAPI("pnpc")
local graphX = loadSharedAPI("graphX")
local colliders = loadSharedAPI("colliders")
function HealthPoint.onInitAPI() --Is called when the api is loaded by loadAPI.
registerEvent(HealthPoint, "onLoop", "assign", true) --Register the loop event
registerEvent(HealthPoint, "onNPCKill", "onNPCKill", true) --Register the damage event
end
----------------------------------------------------------------------------------------------
--- DOCUMENTATION AND FUNCTIONS ---
----------------------------------------------------------------------------------------------
--[[
Damage types
1 = jump
2 = spinjump
3 = fireball
4 = hammer
5 = shell
6 = tail
7 = link
8 = thrown
9 = boomerang
10 = peachbomb
11 = swordbeam
12 = linkfire
13 = iceblock
14 = yoshifire
15 = yoshiice
HealthPoint.setNPCHealth(id, healthamount)
HealthPoint.setNPCDamage(id, damagetype, damageamount)
HealthPoint.setGlobalDamage(damagetype, damageamount)
HealthPoint.makeNPCInvincible(id)
HealthPoint.makeNPCNormal(id)
--]]
----------------------------------------------------------------------------------------------
--- THE ACTUAL CODE STUFF ---
----------------------------------------------------------------------------------------------
local bingo = {1, 2, 3, 4, 5, 6, 7, 8, 12, 15, 17, 18, 19, 20, 23, 24, 25, 27, 28, 29, 36, 37, 38, 39, 42, 43, 44, 47, 48, 49, 50, 51, 52, 53, 54, 55, 59, 61, 63, 65, 71, 72, 73, 74, 76, 77, 86, 89, 93, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 135, 136, 137, 161, 162, 163, 164, 165, 166, 167, 168, 172, 173, 174, 175, 176, 177, 180, 189, 194, 195, 199, 200, 201, 203, 204, 205, 206, 207, 208, 209, 210, 229, 230, 231, 232, 233, 234, 235, 236, 242, 243, 244, 245, 247, 256, 257, 261, 262, 263, 267, 268, 270, 271, 272, 275, 280, 281, 284, 285, 286}
-- Health --
-- Change these values corresponding to the id inside the [] to change the enemy's health --
HealthPoint.npcHealth = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.npcHealth, v, 3)
end
-- Jump Damage --
HealthPoint.jumpDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.jumpDamage, v, 1)
end
-- Spinjump Damage --
HealthPoint.spinjumpDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.spinjumpDamage, v, 1)
end
-- Fireball Damage --
HealthPoint.fireballDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.fireballDamage, v, 1)
end
-- Hammer Damage --
HealthPoint.hammerDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.hammerDamage, v, 1)
end
-- Projectile Damage --
HealthPoint.projectileDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.projectileDamage, v, 1)
end
-- Tail Damage --
HealthPoint.tailDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.tailDamage, v, 1)
end
-- Link Attack Damage --
HealthPoint.linkDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.linkDamage, v, 1)
end
-- Thrown Damage --
HealthPoint.thrownDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.thrownDamage, v, 1)
end
-- Boomerang Damage--
HealthPoint.boomerangDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.boomerangDamage, v, 1)
end
HealthPoint.peachbombDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.peachbombDamage, v, 1)
end
HealthPoint.swordbeamDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.swordbeamDamage, v, 1)
end
HealthPoint.yoshifireDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.yoshifireDamage, v, 1)
end
HealthPoint.iceblockDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.iceblockDamage, v, 1)
end
HealthPoint.linkfireDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.linkfireDamage, v, 1)
end
HealthPoint.yoshiiceDamage = {}
for _,v in pairs(bingo) do
table.insert(HealthPoint.yoshiiceDamage, v, 1)
end
----------------------------------------------------------------------------------------------
--- THE ACTUAL CODE STUFF ---
----------------------------------------------------------------------------------------------
damevaeg = {}
damevaeg[1] = HealthPoint.jumpDamage
damevaeg[2] = HealthPoint.spinjumpDamage
damevaeg[3] = HealthPoint.fireballDamage
damevaeg[4] = HealthPoint.hammerDamage
damevaeg[5] = HealthPoint.projectileDamage
damevaeg[6] = HealthPoint.tailDamage
damevaeg[7] = HealthPoint.linkDamage
damevaeg[8] = HealthPoint.thrownDamage
damevaeg[9] = HealthPoint.boomerangDamage
damevaeg[10] = HealthPoint.peachbombDamage
damevaeg[11] = HealthPoint.swordbeamDamage
damevaeg[12] = HealthPoint.linkfireDamage
damevaeg[13] = HealthPoint.iceblockDamage
damevaeg[14] = HealthPoint.yoshifireDamage
damevaeg[15] = HealthPoint.yoshiiceDamage
function HealthPoint.setNPCHealth(id, number)
HealthPoint.npcHealth[id] = number
end
function HealthPoint.setNPCDamage(id, cause, number)
damevaeg[cause][id] = number
end
function HealthPoint.setGlobalDamage(cause, number)
for l,_ in pairs(HealthPoint.npcHealth) do
damevaeg[cause][l] = number
end
end
function HealthPoint.makeNPCInvincible(id)
for r,_ in pairs(damevaeg) do
damevaeg[r][id] = 0
end
end
function HealthPoint.makeNPCNormal(NPCid)
table.remove(HealthPoint.npcHealth, NPCid)
for r,_ in pairs(damevaeg) do
table.remove(damevaeg[r], NPCid)
end
end
----------------------------------------------------------------------------------------------
--- DAMAGE INPUT ---
----------------------------------------------------------------------------------------------
function HealthPoint.onNPCKill(eventObj, killedNPC, killReason)
if killedNPC.id == 13 and killReason == 4 then
fire = true
hammer = false
shell = false
end
if HealthPoint.npcHealth[killedNPC.id] ~= nil then
local wrappedNPC = pNPC.wrap(killedNPC)
if colliders.collideNPC(wrappedNPC, 171) then
hammer = true
fire = false
shell = false
elseif colliders.collideNPC(wrappedNPC, 292) then
boomerang = true
hammer = false
fire = false
shell = false
elseif colliders.collideNPC(wrappedNPC, 108) then
yoshifire = true
hammer = false
fire = false
shell = false
elseif colliders.collideNPC (wrappedNPC, 263) then
Text.print ("ICE", 100, 100)
ice = true
shell = false
hammer = false
fire = false
elseif colliders.collideNPC (wrappedNPC, 291) then
peachbomb = true
shell = false
elseif colliders.collideNPC (wrappedNPC, 266) then
laser = true
shell = false
elseif colliders.collideNPC(wrappedNPC, 237) then
yoshiice = true
shell = false
else
shell = true
end
if wrappedNPC.data.hit == nil then
wrappedNPC.data.hit = 0
end
if HealthPoint.jumpDamage[wrappedNPC.id] == nil then
HealthPoint.jumpDamage[wrappedNPC.id] = 0
end
if HealthPoint.fireballDamage[wrappedNPC.id] == nil then
HealthPoint.fireballDamage[wrappedNPC.id] = 0
end
if HealthPoint.iceblockDamage[wrappedNPC.id] == nil then
HealthPoint.iceblockDamage[wrappedNPC.id] = 0
end
if HealthPoint.hammerDamage[wrappedNPC.id] == nil then
HealthPoint.hammerDamage[wrappedNPC.id] = 0
end
if HealthPoint.boomerangDamage[wrappedNPC.id] == nil then
HealthPoint.boomerangDamage[wrappedNPC.id] = 0
end
if HealthPoint.yoshifireDamage[wrappedNPC.id] == nil then
HealthPoint.yoshifireDamage[wrappedNPC.id] = 0
end
if HealthPoint.peachbombDamage[wrappedNPC.id] == nil then
HealthPoint.peachbombDamage[wrappedNPC.id] = 0
end
if HealthPoint.swordbeamDamage[wrappedNPC.id] == nil then
HealthPoint.swordbeamDamage[wrappedNPC.id] = 0
end
if HealthPoint.projectileDamage[wrappedNPC.id] == nil then
HealthPoint.projectileDamage[wrappedNPC.id] = 0
end
if HealthPoint.thrownDamage[wrappedNPC.id] == nil then
HealthPoint.thrownDamage[wrappedNPC.id] = 0
end
if HealthPoint.tailDamage[wrappedNPC.id] == nil then
HealthPoint.tailDamage[wrappedNPC.id] = 0
end
if HealthPoint.spinjumpDamage[wrappedNPC.id] == nil then
HealthPoint.spinjumpDamage[wrappedNPC.id] = 0
end
if HealthPoint.linkDamage[wrappedNPC.id] == nil then
HealthPoint.linkDamage[wrappedNPC.id] = 0
end
if HealthPoint.linkfireDamage[wrappedNPC.id] == nil then
HealthPoint.linkfireDamage[wrappedNPC.id] = 0
end
if wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.jumpDamage[wrappedNPC.id] and killReason == 1 then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.jumpDamage[wrappedNPC.id]
playSFX(2)
wrappedNPC.speedX = 0
elseif wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.fireballDamage[wrappedNPC.id] and killReason == 3 and fire then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.fireballDamage[wrappedNPC.id]
playSFX(3)
wrappedNPC.speedX = 0
fire = false
elseif wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.iceblockDamage[wrappedNPC.id] and killReason == 3 and ice then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.iceblockDamage[wrappedNPC.id]
playSFX(3)
wrappedNPC.speedX = 0
elseif wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.hammerDamage[wrappedNPC.id] and killReason == 3 and hammer then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.hammerDamage[wrappedNPC.id]
playSFX(3)
wrappedNPC.speedX = 0
elseif wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.boomerangDamage[wrappedNPC.id] and killReason == 3 and boomerang then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.boomerangDamage[wrappedNPC.id]
playSFX(3)
wrappedNPC.speedX = 0
elseif wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.yoshifireDamage[wrappedNPC.id] and killReason == 3 and yoshifire then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.yoshifireDamage[wrappedNPC.id]
playSFX(3)
wrappedNPC.speedX = 0
elseif wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.yoshifireDamage[wrappedNPC.id] and killReason == 3 and yoshiice then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.yoshiiceDamage[wrappedNPC.id]
playSFX(3)
wrappedNPC.speedX = 0
elseif wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.peachbombDamage[wrappedNPC.id] and killReason == 3 and peachbomb then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.peachbombDamage[wrappedNPC.id]
playSFX(3)
wrappedNPC.speedX = 0
elseif wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.swordbeamDamage[wrappedNPC.id] and killReason == 10 and laser then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.swordbeamDamage[wrappedNPC.id]
playSFX(89)
wrappedNPC.speedX = 0
elseif wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.projectileDamage[wrappedNPC.id] and killReason == 3 and shell and not fire and not ice then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.projectileDamage[wrappedNPC.id]
playSFX(3)
wrappedNPC.speedX = 0
shell = false
elseif wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.thrownDamage[wrappedNPC.id] and (killReason == 4 or killReason == 5) then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.thrownDamage[wrappedNPC.id]
elseif wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.tailDamage[wrappedNPC.id] and killReason == 7 then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.tailDamage[wrappedNPC.id]
playSFX(3)
wrappedNPC.speedX = 0
elseif wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.spinjumpDamage[wrappedNPC.id] and killReason == 8 then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.spinjumpDamage[wrappedNPC.id]
playSFX(2)
wrappedNPC.speedX = 0
elseif wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.linkDamage[wrappedNPC.id] and killReason == 10 and not fire then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.linkDamage[wrappedNPC.id]
playSFX(89)
wrappedNPC.speedX = 0
elseif wrappedNPC.data.hit > 1 and wrappedNPC.data.hit > HealthPoint.linkfireDamage[wrappedNPC.id] and killReason == 10 and fire then
eventObj.cancelled = true
wrappedNPC:mem(0x156, FIELD_WORD, 20)
wrappedNPC.data.hit = wrappedNPC.data.hit - HealthPoint.linkfireDamage[wrappedNPC.id]
playSFX(89)
wrappedNPC.speedX = 0
end
end
end
----------------------------------------------------------------------------------------------
--- HEALTH ASSIGNMENT ---
----------------------------------------------------------------------------------------------
function HealthPoint.assign()
for k,v in pairs(NPC.get()) do
local n = pNPC.wrap(v);
if n.data.hit == nil then
if HealthPoint.npcHealth[n.id] ~= nil then
n.data.hit = HealthPoint.npcHealth[n.id]
end
end
if n.data.hp == nil then
if HealthPoint.npcHealth[n.id] ~= nil then
n.data.hp = HealthPoint.npcHealth[n.id]
end
end
if n.data.hpmax == nil then
if HealthPoint.npcHealth[n.id] ~= nil then
n.data.hpmax = HealthPoint.npcHealth[n.id]
end
end
if n ~= nil and HealthPoint.healthbar then
if n:mem(0x12A, FIELD_WORD) ~= 0 and n.data.hp ~= nil then
graphX.boxLevel (n.x-8,n.y-6, 32, 8, 0xFFFFFFF55)
graphX.boxLevel (n.x-7,n.y-5, 30, 6, 0x00000055)
graphX.boxLevel (n.x-7,n.y-5, n.data.hp/n.data.hpmax*30, 6, 0xFFF05BFF)
graphX.boxLevel (n.x-7,n.y-5, n.data.hit/n.data.hpmax*30, 6, 0xF61818FF)
end
end
if n.data.hp ~= nil then
if n.data.hp > n.data.hit then
n.data.hp = n.data.hp -0.02
end
if n.data.hit > n.data.hpmax then
n.data.hit = n.data.hpmax
end
end
end
end
return HealthPoint
And here is my lunadll.lua for the level:
local health = loadAPI("HealthPoint")
health.setNPCHealth(89, 2)
health.setNPCHealth(132, 1)
health.setNPCHealth(37, 5000)
function onLoad()
player:mem(0xF0, FIELD_WORD, 1)
end
function onKeyDown(keycode)
if (keycode == KEY_SEL) then
player:kill()
end
end
function onInputUpdate()
if(player.altJumpKeyPressing) then
player.altJumpKeyPressing = false;
player.jumpKeyPressing = true;
end
end
function onStart()
mem(0x00B2C5AC,FIELD_FLOAT,99)
end
I did not have this problem on the previous version of SMBX2.
Your LunaLUA seems to be outdated. Try the nightly build, see if that helps.
|
|
|
|
|
|
|
|
|
-
Emral
- Cute Yoshi Egg

- Posts: 9890
- Joined: Mon Jan 20, 2014 12:58 pm
- Flair: Phoenix
Postby Emral » Mon Oct 03, 2016 12:04 pm
Don't use healthPoint it's known for being deprecated and that it breaks stuff. It was built with graphX (an outdated API) and an old version of colliders in mind. Until someone makes a replacement (we're waiting for onNPCHarm for this, essentially) you're probably better off just coding the hp values into your own lua file.Should be just a pnpc.data counter.
Don't use onLoad it's bad. (onStart instead)
Don't use loadAPI it's bad. (API.load instead)
Use player.character instead of 0xF0.
Why kill the player when they hit drop item?
The openGL errors are because as a level reloads over and over, the graphics get loaded over and over too until a limit is reached (something like that).
Also why copy individual files FROM beta 3 if you can just work with beta 3 to begin with? Copying individual stuff out of there without knowing what it relies on is asking for trouble.
|
|
|
|
|
|
|
|
|
-
Reign
- Chain Chomp

- Posts: 327
- Joined: Tue Jan 21, 2014 4:22 am
Postby Reign » Mon Oct 03, 2016 12:06 pm
Enjl wrote:Don't use healthPoint it's known for being deprecated and that it breaks stuff. It was built with graphX (an outdated API) and an old version of colliders in mind. Until someone makes a replacement (we're waiting for onNPCHarm for this, essentially) you're probably better off just coding the hp values into your own lua file.Should be just a pnpc.data counter.
Don't use onLoad it's bad. (onStart instead)
Don't use loadAPI it's bad. (API.load instead)
Use player.character instead of 0xF0.
Why kill the player when they hit drop item?
The openGL errors are because as a level reloads over and over, the graphics get loaded over and over too until a limit is reached (something like that).
Also why copy individual files FROM beta 3 if you can just work with beta 3 to begin with? Copying individual stuff out of there without knowing what it relies on is asking for trouble.
Ahh, more work to do.  Thanks.
The drop item key is a suicide button (for when a puzzle has gone wrong).
Last edited by Reign on Mon Oct 03, 2016 12:13 pm, edited 2 times in total.
|
|
|
|
|
|
|
|
|
-
Emral
- Cute Yoshi Egg

- Posts: 9890
- Joined: Mon Jan 20, 2014 12:58 pm
- Flair: Phoenix
Postby Emral » Mon Oct 03, 2016 12:07 pm
there's a cheat code in beta 3 for that called "suicide"
|
|
|
|
|
|
|
|
|
-
Reign
- Chain Chomp

- Posts: 327
- Joined: Tue Jan 21, 2014 4:22 am
Postby Reign » Mon Oct 03, 2016 12:13 pm
Enjl wrote:there's a cheat code in beta 3 for that called "suicide"
Well the whole point of it is to be able to access it in a nanosecond.
But honestly I'm at a loss with the pnpc.data counter, is there any kind of tutorial for it?
|
|
|
|
|
|
|
|
|
-
Emral
- Cute Yoshi Egg

- Posts: 9890
- Joined: Mon Jan 20, 2014 12:58 pm
- Flair: Phoenix
Postby Emral » Mon Oct 03, 2016 12:23 pm
Reign wrote:Enjl wrote:there's a cheat code in beta 3 for that called "suicide"
Well the whole point of it is to be able to access it in a nanosecond.
But honestly I'm at a loss with the pnpc.data counter, is there any kind of tutorial for it?
initialisation:
for k,v in pairs(id) do
w = pnpc.wrap(v)
if w.data.hpCounter == nil then w.data.hpCounter = 20 end
end
w.data.hpCounter is a variable saved for each npc you save it for and can be accessed across ticks. The idea is to cancel the killObj if it's greater than 0 in onNPCKill.
My worry with the suicide button is that people will press it by accident BECAUSE it's immediately accessible. Can lead to very frustrating deaths.
|
|
|
|
|
|
|
|
|
-
aero
- Palom

- Posts: 4787
- Joined: Fri Mar 28, 2014 2:51 pm
Postby aero » Mon Oct 03, 2016 10:11 pm
1. Is it possible to get and/or alter the text of the currently displayed SMBX Message box?
2. Is it possible to use SMBX Message Boxes as a point of reference for drawing sprites? (i.e. Drawing a sprite at a certain spot in the message to display a character or something like that)
|
|
|
|
|
|
|
|
|
-
SpoonyBardOL
- Bot

- Posts: 57
- Joined: Thu Aug 04, 2016 5:56 pm
Postby SpoonyBardOL » Tue Oct 04, 2016 5:58 am
Sorry if this has been asked or answered already. How would you go about using Lua to change the default sound effects and BGM episode-wide? I'm looking to attempt to export the Super Talking Time Bros games to 2.0, but since they used their own sound effects and world map BGMs I'd need to figure out how to code that.
|
|
|
|
|
|
|
|
|
-
Emral
- Cute Yoshi Egg

- Posts: 9890
- Joined: Mon Jan 20, 2014 12:58 pm
- Flair: Phoenix
Postby Emral » Tue Oct 04, 2016 6:11 am
Aero wrote:1. Is it possible to get and/or alter the text of the currently displayed SMBX Message box?
2. Is it possible to use SMBX Message Boxes as a point of reference for drawing sprites? (i.e. Drawing a sprite at a certain spot in the message to display a character or something like that)
1) there is an onMessageBox event that has the message as a second argument
2) Not really. You can however use textblox.printExt to print with your own font which has that special character looking like something else. Using onMessageBox you're able to cancel the event (first argument) and then load the message into a textblox printExt call. That should work for what you're trying to do. Keep in mind textblox is being updated heavily right now so you should keep the version you're working with around in case backwards compatibility gets lost somehow.
SpoonyBardOL wrote:Sorry if this has been asked or answered already. How would you go about using Lua to change the default sound effects and BGM episode-wide? I'm looking to attempt to export the Super Talking Time Bros games to 2.0, but since they used their own sound effects and world map BGMs I'd need to figure out how to code that.
Check smbx/ini_examples. You can copy sounds.ini and musc.ini over to your episode folder and replace filepaths
|
|
|
|
|
|
|
|
|
-
SpoonyBardOL
- Bot

- Posts: 57
- Joined: Thu Aug 04, 2016 5:56 pm
Postby SpoonyBardOL » Tue Oct 04, 2016 10:48 am
Enjl wrote:Check smbx/ini_examples. You can copy sounds.ini and musc.ini over to your episode folder and replace filepaths
Thanks for the reply. I found the file and it looks like it should be straightforward, but I can't get it to work. For now I'm just trying to replace the smw-exit.ogg sound, so I put my version in a folder called 'sounds' in my episode folder (currently just called 'test'), but nothing I add to the filename in the ini file is working. Not sounds/smw-exit.ogg, test/sounds/smw-exit.ogg, worlds/test/sounds/smw-exit.ogg, or data/worlds/test/sounds/smw-exit.ogg. How should I be pointing it to that location?
|
|
|
|
|
|
|
|
|
-
Reign
- Chain Chomp

- Posts: 327
- Joined: Tue Jan 21, 2014 4:22 am
Postby Reign » Tue Oct 04, 2016 11:14 am
SpoonyBardOL wrote:Enjl wrote:Check smbx/ini_examples. You can copy sounds.ini and musc.ini over to your episode folder and replace filepaths
Thanks for the reply. I found the file and it looks like it should be straightforward, but I can't get it to work. For now I'm just trying to replace the smw-exit.ogg sound, so I put my version in a folder called 'sounds' in my episode folder (currently just called 'test'), but nothing I add to the filename in the ini file is working. Not sounds/smw-exit.ogg, test/sounds/smw-exit.ogg, worlds/test/sounds/smw-exit.ogg, or data/worlds/test/sounds/smw-exit.ogg. How should I be pointing it to that location?
It might just be that you should use \ instead of /, I think I had the same mistake. It should be sounds\smw-exit.ogg.
|
|
|
|
|
|
|
|
|
-
Emral
- Cute Yoshi Egg

- Posts: 9890
- Joined: Mon Jan 20, 2014 12:58 pm
- Flair: Phoenix
Postby Emral » Tue Oct 04, 2016 11:17 am
SpoonyBardOL wrote:Enjl wrote:Check smbx/ini_examples. You can copy sounds.ini and musc.ini over to your episode folder and replace filepaths
Thanks for the reply. I found the file and it looks like it should be straightforward, but I can't get it to work. For now I'm just trying to replace the smw-exit.ogg sound, so I put my version in a folder called 'sounds' in my episode folder (currently just called 'test'), but nothing I add to the filename in the ini file is working. Not sounds/smw-exit.ogg, test/sounds/smw-exit.ogg, worlds/test/sounds/smw-exit.ogg, or data/worlds/test/sounds/smw-exit.ogg. How should I be pointing it to that location?
Try renaming the file to be something other than the original filename. It might search in the main directory. (I have a setup with resources/sfx_null.wav which works)
If that doesn't work, there's a bug I noticed with LunaTester in PGE regarding episode-wide sounds.ini
For some reason sounds.ini sometimes does not work unless a level-wise sounds.ini was loaded before (I don't know if this was fixed yet). Try sounds/smw-exit.ogg (or your new filename format) once more, but test it from the main game if possible. Though not being able to properly hear the sound when testing is a nuisance, you can confirm that it works this way.
Reign wrote:It should be sounds\smw-exit.ogg.
No, / works.
|
|
|
|
|
|
|
|
|
-
Reign
- Chain Chomp

- Posts: 327
- Joined: Tue Jan 21, 2014 4:22 am
Postby Reign » Tue Oct 04, 2016 11:27 am
Enjl wrote:Reign wrote:It should be sounds\smw-exit.ogg.
No, / works.
Ah, right, now I remember the mistake. I did not restart SMBX before testing again.
In other news, I'm still going to take a risk and leave the healthpoint.lua in. The error was caused by having a generator in the level. I can easily live without the generator but fixing and figuring out a health point code for countless levels would be too much. Hopefully it won't break any more in the future (wink wink lua developers).
|
|
|
|
|
|
|
|
|
-
Emral
- Cute Yoshi Egg

- Posts: 9890
- Joined: Mon Jan 20, 2014 12:58 pm
- Flair: Phoenix
Postby Emral » Tue Oct 04, 2016 11:34 am
Healthpoint is an old API not part of lunalua core and is only included for backwards compatibility at this point. The oversight of generators is one of the things where I mentioned that it breaks. I don't see any updates to the API happening without a complete rewrite and only once onNPCHarm is a thing, so for now your only chance to fix generators is to modify the api yourself, really.
|
|
|
|
|
Return to “LunaLua”
Users browsing this forum: No registered users and 2 guests
|