Easy LunaLua (NPC Code-style System; 1.1--1/1/2018)

This is the place for discussion and support for LunaLua and related modifications and libraries.
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
Raccoon Mario
Raccoon Mario
Posts: 7112
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Contact:

Re: Easy LunaLua (NPC Code-style System; 1.0)

Postby PixelPest » Wed Nov 29, 2017 4:17 pm

Taycamgame wrote:So i'm pretty sure that the timer is broken. When i use either the "time" or "galaxytime", they seem to work fine, until the timer reaches 0. The player is killed, but an error message does come up saying something like "attempt to perform arithmetic on local 'currtime'", or "bad argument #1 to 'ceil' (number expected, got nil)". How do i fix this? The code i put in, as an example, was "time=10", or "galaxytime=10". I get the error either way.
EDIT: Also, another problem: The fog works except no matter what colour i try to change it to, it is always white. Example, i put "fogcolour=#B0171F" expecting it to go a tint of red, but it was still white. "fogcolour=B0171F" does the same thing (white).
The timer reaching zero was an issue before but I thought I had fixed it. Must've only patched the upload for clock.lua alone. Will do that ASAP. It's not a problem with something you're doing but the base code. In terms of the colour, try 0xB0171F.

EDIT: Try downloading it now and see if there's a difference: https://www.dropbox.com/s/lzky8pjhscq1z ... a.zip?dl=0

User avatar
Taycamgame
Gold Yoshi Egg
Gold Yoshi Egg
Posts: 1466
Joined: Mon Jun 19, 2017 11:35 am
Flair: Stargard
Contact:

Re: Easy LunaLua (NPC Code-style System; 1.0)

Postby Taycamgame » Wed Nov 29, 2017 4:29 pm

PixelPest wrote:
Taycamgame wrote:So i'm pretty sure that the timer is broken. When i use either the "time" or "galaxytime", they seem to work fine, until the timer reaches 0. The player is killed, but an error message does come up saying something like "attempt to perform arithmetic on local 'currtime'", or "bad argument #1 to 'ceil' (number expected, got nil)". How do i fix this? The code i put in, as an example, was "time=10", or "galaxytime=10". I get the error either way.
EDIT: Also, another problem: The fog works except no matter what colour i try to change it to, it is always white. Example, i put "fogcolour=#B0171F" expecting it to go a tint of red, but it was still white. "fogcolour=B0171F" does the same thing (white).
The timer reaching zero was an issue before but I thought I had fixed it. Must've only patched the upload for clock.lua alone. Will do that ASAP. It's not a problem with something you're doing but the base code. In terms of the colour, try 0xB0171F.

EDIT: Try downloading it now and see if there's a difference: https://www.dropbox.com/s/lzky8pjhscq1z ... a.zip?dl=0
I tested some different values for the fog code, it seems that if a letter is used then it automatically goes white. Numbers alone work, are they definitely hex codes? Because it seems there will be many unusable colors due to this.
I will download the new one you posted.
EDIT: The codes work when inputting that 0x before it, don't get why though. And the clock doesn't seem to function still, but i'll just wait till beta 4 so a timer could come built in. I wasn't intending to use the timer much anyway.
Image
Image

It is given that x = 5. What is the value of y?

User avatar
Hoeloe
Boomerang Bro
Boomerang Bro
Posts: 1308
Joined: Sat Oct 03, 2015 6:18 pm
Flair: The Codehaus Girl
Pronouns: she/her

Re: Easy LunaLua (NPC Code-style System; 1.0)

Postby Hoeloe » Thu Nov 30, 2017 5:30 am

Taycamgame wrote: EDIT: The codes work when inputting that 0x before it, don't get why though. And the clock doesn't seem to function still, but i'll just wait till beta 4 so a timer could come built in. I wasn't intending to use the timer much anyway.
0x is a universal marker for a hexadecimal number. It looks like the system is treating the fog colour parameter as a number, so you can either use the decimal representation, or use 0x to mark it as a hexadecimal value.

PixelPest
Raccoon Mario
Raccoon Mario
Posts: 7112
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Contact:

Re: Easy LunaLua (NPC Code-style System; 1.0)

Postby PixelPest » Thu Nov 30, 2017 7:16 am

Taycamgame wrote:EDIT: The codes work when inputting that 0x before it, don't get why though. And the clock doesn't seem to function still, but i'll just wait till beta 4 so a timer could come built in. I wasn't intending to use the timer much anyway.
What part of the timer isn't working?

User avatar
Taycamgame
Gold Yoshi Egg
Gold Yoshi Egg
Posts: 1466
Joined: Mon Jun 19, 2017 11:35 am
Flair: Stargard
Contact:

Re: Easy LunaLua (NPC Code-style System; 1.0)

Postby Taycamgame » Thu Nov 30, 2017 1:54 pm

PixelPest wrote:
Taycamgame wrote:EDIT: The codes work when inputting that 0x before it, don't get why though. And the clock doesn't seem to function still, but i'll just wait till beta 4 so a timer could come built in. I wasn't intending to use the timer much anyway.
What part of the timer isn't working?
I downloaded the new version you sent, but the timer still has an error when it hits 0. It does work, but it does come up with a debug window.
I'll just wait till beta 4 to see if a new timer comes with it, but thanks for making this.
Image
Image

It is given that x = 5. What is the value of y?

PixelPest
Raccoon Mario
Raccoon Mario
Posts: 7112
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Contact:

Re: Easy LunaLua (NPC Code-style System; 1.0)

Postby PixelPest » Thu Nov 30, 2017 2:45 pm

I just uploaded the wrong file so I can easily fix it since Beta 4 is a while off still

User avatar
CoinKillerL
Dolphin
Dolphin
Posts: 92
Joined: Mon Nov 27, 2017 2:42 pm

Re: Easy LunaLua (NPC Code-style System; 1.0)

Postby CoinKillerL » Thu Nov 30, 2017 4:44 pm

-deleted-
Last edited by CoinKillerL on Fri Dec 01, 2017 8:51 am, edited 1 time in total.
Image
Check also out these amazing projects!
Spoiler: show
ImageImage
Image

User avatar
CoinKillerL
Dolphin
Dolphin
Posts: 92
Joined: Mon Nov 27, 2017 2:42 pm

Re: Easy LunaLua (NPC Code-style System; 1.0)

Postby CoinKillerL » Fri Dec 01, 2017 8:50 am

fog color functionality is broken... instead of making pink fog it makes a green one!
Image
Check also out these amazing projects!
Spoiler: show
ImageImage
Image

PixelPest
Raccoon Mario
Raccoon Mario
Posts: 7112
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Contact:

Re: Easy LunaLua (NPC Code-style System; 1.0)

Postby PixelPest » Fri Dec 01, 2017 9:23 am

CoinKillerL wrote:fog color functionality is broken... instead of making pink fog it makes a green one!
What hex colour are you using? Also that would be a problem with particles.lua if so, however I expect not

User avatar
CoinKillerL
Dolphin
Dolphin
Posts: 92
Joined: Mon Nov 27, 2017 2:42 pm

Re: Easy LunaLua (NPC Code-style System; 1.0)

Postby CoinKillerL » Fri Dec 01, 2017 9:35 am

PixelPest wrote:
CoinKillerL wrote:fog color functionality is broken... instead of making pink fog it makes a green one!
What hex colour are you using? Also that would be a problem with particles.lua if so, however I expect not
I don't remember. I'm gonna retry and let you know
Image
Check also out these amazing projects!
Spoiler: show
ImageImage
Image

User avatar
CoinKillerL
Dolphin
Dolphin
Posts: 92
Joined: Mon Nov 27, 2017 2:42 pm

Re: Easy LunaLua (NPC Code-style System; 1.0)

Postby CoinKillerL » Fri Dec 01, 2017 9:40 am

i'm using FFD700 and it's only making white fog
Image
Check also out these amazing projects!
Spoiler: show
ImageImage
Image

User avatar
Hoeloe
Boomerang Bro
Boomerang Bro
Posts: 1308
Joined: Sat Oct 03, 2015 6:18 pm
Flair: The Codehaus Girl
Pronouns: she/her

Re: Easy LunaLua (NPC Code-style System; 1.0)

Postby Hoeloe » Fri Dec 01, 2017 9:41 am

Be sure to write 0xFFD700, not just FFD700, otherwise it tries to interpret the value as a decimal number, which doesn't have the symbols F or D, so it just defaults to white.

User avatar
CoinKillerL
Dolphin
Dolphin
Posts: 92
Joined: Mon Nov 27, 2017 2:42 pm

Re: Easy LunaLua (NPC Code-style System; 1.0)

Postby CoinKillerL » Sat Dec 02, 2017 11:18 am

Hoeloe wrote:Be sure to write 0xFFD700, not just FFD700, otherwise it tries to interpret the value as a decimal number, which doesn't have the symbols F or D, so it just defaults to white.
Ok,i'll try it and i let you know
Image
Check also out these amazing projects!
Spoiler: show
ImageImage
Image

User avatar
Radiance
Rip Van Fish
Rip Van Fish
Posts: 1299
Joined: Thu Dec 10, 2015 7:53 am
Pronouns: he

Re: Easy LunaLua (NPC Code-style System; 1.0)

Postby Radiance » Wed Dec 06, 2017 5:44 am

Can I somehow disable run button through this? If not, does runspeed=0 prevents the player to run?

PixelPest
Raccoon Mario
Raccoon Mario
Posts: 7112
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Contact:

Re: Easy LunaLua (NPC Code-style System; 1.0)

Postby PixelPest » Wed Dec 06, 2017 7:03 am

Mr Briney wrote:Can I somehow disable run button through this? If not, does runspeed=0 prevents the player to run?
Try setting it to 3 (equal to the walk speed)

User avatar
Taycamgame
Gold Yoshi Egg
Gold Yoshi Egg
Posts: 1466
Joined: Mon Jun 19, 2017 11:35 am
Flair: Stargard
Contact:

Re: Easy LunaLua (NPC Code-style System; 1.0)

Postby Taycamgame » Sun Dec 17, 2017 8:58 am

Sorry for the bump, but a question involving autoscroll and events:
Pseudocode:
(Check to see if EventA is triggered)
(If EventA is triggered then do:)
(scroll1right=0.5)
How would I do this? So basically an event triggers an autoscroll section when it happens.
Image
Image

It is given that x = 5. What is the value of y?

PixelPest
Raccoon Mario
Raccoon Mario
Posts: 7112
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Contact:

Re: Easy LunaLua (NPC Code-style System; 1.0)

Postby PixelPest » Sun Dec 17, 2017 10:36 am

Taycamgame wrote:Sorry for the bump, but a question involving autoscroll and events:
Pseudocode:
(Check to see if EventA is triggered)
(If EventA is triggered then do:)
(scroll1right=0.5)
How would I do this? So basically an event triggers an autoscroll section when it happens.
You can't do that via easyLuna.lua, but can via normal LunaLua

User avatar
Taycamgame
Gold Yoshi Egg
Gold Yoshi Egg
Posts: 1466
Joined: Mon Jun 19, 2017 11:35 am
Flair: Stargard
Contact:

Re: Easy LunaLua (NPC Code-style System; 1.0)

Postby Taycamgame » Sun Dec 17, 2017 1:20 pm

If you could provide the lua code for that, it would be helpful and much appreciated.
Image
Image

It is given that x = 5. What is the value of y?

User avatar
WhatDoYouThinks
Koopa
Koopa
Posts: 17
Joined: Sat Jul 08, 2017 4:39 pm

Re: Easy LunaLua (NPC Code-style System; 1.0)

Postby WhatDoYouThinks » Fri Dec 22, 2017 1:53 pm

This looks amazing! I am going to have to use this in my episode.
I honestly don't know what to put here yet!

PixelPest
Raccoon Mario
Raccoon Mario
Posts: 7112
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Contact:

Re: Easy LunaLua (NPC Code-style System; 1.1--1/1/2018)

Postby PixelPest » Mon Jan 01, 2018 12:56 pm

There was an issue regarding an error that occurred when the clock ran out. That should be fixed as of now: https://www.dropbox.com/s/lzky8pjhscq1z ... a.zip?dl=0. Sorry for the inconvenience


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 2 guests