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?
|
|
|
|
-
Artix3
- Goomba

- Posts: 1
- Joined: Sat May 17, 2014 7:28 pm
Postby Artix3 » Mon Jun 08, 2015 6:04 pm
Out of curiosity, is there a way to check "if playing"? Trying to use onLoad() and I've had it crash when I load the level in question in the level editor. Being able to add an "if game is running" conditional would help a lot there.
|
|
|
|
|
|
|
|
|
-
Kevsoft
- Flurry

- Posts: 375
- Joined: Sun Jul 27, 2014 8:03 am
Postby Kevsoft » Tue Jun 09, 2015 12:51 am
Maybe try onLoadSection0.
|
|
|
|
|
|
|
|
|
-
lighthouse64
- Charged Spiny

- Posts: 1804
- Joined: Sat Apr 26, 2014 6:28 am
Postby lighthouse64 » Tue Jun 09, 2015 10:55 am
local g = 3
gravity(g)
onJump(g=g*-1)
I changed it up a bit, but it still shows an error.
|
|
|
|
|
|
|
|
|
-
PersonNamedUser
- Birdo

- Posts: 2882
- Joined: Fri Feb 27, 2015 8:07 pm
Postby PersonNamedUser » Tue Jun 09, 2015 10:24 pm
How do you change the grab offset of characters? I want to make Mario hold objects above him, how do I do it?
|
|
|
|
|
|
|
|
|
-
lighthouse64
- Charged Spiny

- Posts: 1804
- Joined: Sat Apr 26, 2014 6:28 am
Postby lighthouse64 » Wed Jun 10, 2015 12:20 am
Oh. I get it now  Because last time I didn't understand, but it all makes sense now.  Thanks Kevsoft!
But I'm just wondering, does lua do negative numbers?
|
|
|
|
|
|
|
|
|
-
Wohlstand
- Van De Graf

- Posts: 2008
- Joined: Tue Feb 11, 2014 4:44 pm
- Flair: [ˈvoːlˌʃtant], 狐エンジニア
- Pronouns: he/him
-
Contact:
Postby Wohlstand » Wed Jun 10, 2015 12:43 am
SuperMario12345 wrote:How do you change the grab offset of characters? I want to make Mario hold objects above him, how do I do it?
Use calibration tool (open one of "grabbed item" frames and do your modifications) and save the INI file which will define than, when you need to apply than INI file by onLoad() function:
Code: Select all Level.loadPlayerHitBoxes(int characterId, int powerUpId, string iniFilename)
More info about here:
http://engine.wohlnet.ru/pgewiki/Playab ... th_LunaLUA
|
|
|
|
|
|
|
|
|
-
Destiny
- Volcano Lotus

- Posts: 572
- Joined: Tue Apr 22, 2014 2:40 pm
Postby Destiny » Wed Jun 10, 2015 1:37 am
When I try to open the recent version, I get a message error about KERNEL32.dll (I guess it was "The procedure Entry Point GetThreadId could not be located in the dynamic link library KERNEL32.dll", not sure because my system is in portuguese). Is it possible to fix?
|
|
|
|
|
|
|
|
|
-
PersonNamedUser
- Birdo

- Posts: 2882
- Joined: Fri Feb 27, 2015 8:07 pm
Postby PersonNamedUser » Wed Jun 10, 2015 2:05 am
Wohlstand wrote:SuperMario12345 wrote:How do you change the grab offset of characters? I want to make Mario hold objects above him, how do I do it?
Use calibration tool (open one of "grabbed item" frames and do your modifications) and save the INI file which will define than, when you need to apply than INI file by onLoad() function:
Code: Select all Level.loadPlayerHitBoxes(int characterId, int powerUpId, string iniFilename)
More info about here:
http://engine.wohlnet.ru/pgewiki/Playab ... th_LunaLUA
Do I use a lunalua or text file?
|
|
|
|
|
|
|
|
|
-
Kevsoft
- Flurry

- Posts: 375
- Joined: Sun Jul 27, 2014 8:03 am
Postby Kevsoft » Wed Jun 10, 2015 2:13 am
Sirius wrote:When I try to open the recent version, I get a message error about KERNEL32.dll (I guess it was "The procedure Entry Point GetThreadId could not be located in the dynamic link library KERNEL32.dll", not sure because my system is in portuguese). Is it possible to fix?
Crap, you probably use something like Windows XP? I have to fix that!
lighthouse64 wrote:But I'm just wondering, does lua do negative numbers?
Why shouldn't it  ?
|
|
|
|
|
|
|
|
|
-
PersonNamedUser
- Birdo

- Posts: 2882
- Joined: Fri Feb 27, 2015 8:07 pm
Postby PersonNamedUser » Wed Jun 10, 2015 3:12 am
I'm putting in this code:
Code: Select all function onLoad()
-- ....
Level.loadPlayerHitBoxes(1, 1, "mario-1.ini")
end
And it won't work!
|
|
|
|
|
|
|
|
|
-
Wohlstand
- Van De Graf

- Posts: 2008
- Joined: Tue Feb 11, 2014 4:44 pm
- Flair: [ˈvoːlˌʃtant], 狐エンジニア
- Pronouns: he/him
-
Contact:
Postby Wohlstand » Wed Jun 10, 2015 4:13 am
SuperMario12345 wrote:I'm putting in this code:
Code: Select all function onLoad()
-- ....
Level.loadPlayerHitBoxes(1, 1, "mario-1.ini")
end
And it won't work!
Are you put mario-1.ini file into custom level folder? I think, you doesn't made it. You need to use Player Calibrator to setup hitbox with settings
|
|
|
|
|
|
|
|
|
-
PersonNamedUser
- Birdo

- Posts: 2882
- Joined: Fri Feb 27, 2015 8:07 pm
Postby PersonNamedUser » Wed Jun 10, 2015 2:33 pm
With Lunaworld Do you need mario-1.ini for every level?
|
|
|
|
|
|
|
|
|
-
PersonNamedUser
- Birdo

- Posts: 2882
- Joined: Fri Feb 27, 2015 8:07 pm
Postby PersonNamedUser » Wed Jun 10, 2015 3:00 pm
Can you help me change the character hit-box? I tried to change buzzy beetle's Hit-box but he go in the ground instead of standing on-top of it like he should, I need help with hit-boxes.
|
|
|
|
|
|
|
|
|
-
FanofSMBX
- Mouser

- Posts: 3878
- Joined: Sun Dec 22, 2013 12:01 pm
Postby FanofSMBX » Wed Jun 10, 2015 3:02 pm
SuperMario12345 wrote:Can you help me change the character hit-box? I tried to change buzzy beetle's Hit-box but he go in the ground instead of standing on-top of it like he should, I need help with hit-boxes.
Well look on the sprite sheet, there is a gap at the top above Buzzy Beetle. To make the hitbox right you have to move each of his sprites up.
|
|
|
|
|
|
|
|
|
-
Fennor
- Dolphin

- Posts: 94
- Joined: Sat Apr 25, 2015 12:08 pm
Postby Fennor » Wed Jun 10, 2015 3:28 pm
Usually the player graphic overlaps by two pixels with the ground. So if you have a frame with a hitbox height of 30, your graphic should have a height of 32 pixels and begin at the very top of the frame/y=0 (I mean as FanofSMBX said, you have to move them up. The whole sheets have a height of 1000 pixles, each frame has 100 pixels. So the top of the first frame is at y=0, the second at y=100 and so on).
You also have to consider the yOffset of the hitbox. Let's say the hitbox height is 30, the yOffset is 2, (Keep in mind that you currently can't change this offset) in this case your graphic should have a height of 34 pixels and begin at the top. The first 2 pixels (y=0 and y=1) of the graphic won't be part of the hitbox due to the yOffset, it moves the hitbox down by 2 pixels. The next 30 pixels (y=2 to y=31) of the graphic will be part of the hitbox. The last 2 pixels of the graphic (y=32 and y=33) will overlap with the top of the floor and aren't part of the hitbox.
EDIT: More about offsets. If you have an yOffset of 2 but don't want the hitbox to begin at the very top - not just 2 pixels down from the top - you can increase the hitbox height by 2, but at the same time move the graphic 2 pixels down. The graphic will still stand on the ground correctly, but at the same time the top of the graphic will be part of the hitbox.
|
|
|
|
|
|
|
|
|
-
Destiny
- Volcano Lotus

- Posts: 572
- Joined: Tue Apr 22, 2014 2:40 pm
Postby Destiny » Wed Jun 17, 2015 7:28 pm
Kevsoft wrote:Sirius wrote:When I try to open the recent version, I get a message error about KERNEL32.dll (I guess it was "The procedure Entry Point GetThreadId could not be located in the dynamic link library KERNEL32.dll", not sure because my system is in portuguese). Is it possible to fix?
Crap, you probably use something like Windows XP? I have to fix that!
So, it's going to be fixed in the next version?
|
|
|
|
|
|
|
|
|
-
Kevsoft
- Flurry

- Posts: 375
- Joined: Sun Jul 27, 2014 8:03 am
Postby Kevsoft » Thu Jun 18, 2015 3:57 am
Yes, it should be already fixed, but there is still another small issue, that have to be fixed, before the hotfix will be released.
|
|
|
|
|
|
|
|
|
-
PizzaLover
- Guest
Postby PizzaLover » Sat Jun 20, 2015 6:51 am
Hello everyone. I'd need some help with code: is it possible to make section 3 in my level so player and npcs in there fall slower? Thanks
|
|
|
|
|
Return to “LunaLua”
Users browsing this forum: No registered users and 1 guest
|