[LunaLua] Time limit to stay underwater

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?
HenryRichard
Reznor
Reznor
Posts: 2843
Joined: Mon Dec 23, 2013 12:09 pm
Flair: Is this where I type my password?
Contact:

Re: [LunaLua] Time limit to stay underwater

Postby HenryRichard » Fri Apr 01, 2016 5:42 pm

That's awesome! I'm gonna have to find a way to use this!

Matt_The_Slime
Lakitu
Lakitu
Posts: 459
Joined: Wed Mar 18, 2015 2:17 pm
Contact:

Re: [LunaLua] Time limit to stay underwater

Postby Matt_The_Slime » Fri Apr 01, 2016 6:44 pm

lotus006 wrote:
lotus006 wrote:
HenryRichard wrote:That's cool, though you should make it regenerate more quickly and if you could make separate meters for P1 & P2 that are displayed over their heads that would be cool.
Yeah Nice idea that shouldnt be hard to make, that should be less harder than that splitscreen detection to do :P, if you have other idea feel free to ask :D
Omg this thing have turned very cool the how is it the hud :D I think I prefer this version !! and you ?

@ Matt_The_Slime:
I think to know what you think, but do you have example ? but I think it should be easy to do :D

Something like this:

lotus006
Spike
Spike
Posts: 284
Joined: Thu Sep 24, 2015 12:59 am

Re: [LunaLua] Time limit to stay underwater

Postby lotus006 » Sat Apr 02, 2016 10:11 pm

Matt_The_Slime wrote:Something cool, and very simple to add would be Underwater Sonic Physics :D (separate download)
Where you can't swim, but you can jump high
This would be making a Sonic themed episode VERY Easy
Can you point me in the video the time where is show this what do you mean finally I'm not sure on what u really mean :(

Matt_The_Slime
Lakitu
Lakitu
Posts: 459
Joined: Wed Mar 18, 2015 2:17 pm
Contact:

Re: [LunaLua] Time limit to stay underwater

Postby Matt_The_Slime » Sat Apr 02, 2016 10:32 pm

lotus006 wrote:
Matt_The_Slime wrote:Something cool, and very simple to add would be Underwater Sonic Physics :D (separate download)
Where you can't swim, but you can jump high
This would be making a Sonic themed episode VERY Easy
Can you point me in the video the time where is show this what do you mean finally I'm not sure on what u really mean :(
At about 2:38

lotus006
Spike
Spike
Posts: 284
Joined: Thu Sep 24, 2015 12:59 am

Re: [LunaLua] Time limit to stay underwater

Postby lotus006 » Sat Apr 02, 2016 11:23 pm

Matt_The_Slime wrote:
lotus006 wrote:
Matt_The_Slime wrote:Something cool, and very simple to add would be Underwater Sonic Physics :D (separate download)
Where you can't swim, but you can jump high
This would be making a Sonic themed episode VERY Easy
Can you point me in the video the time where is show this what do you mean finally I'm not sure on what u really mean :(
At about 2:38
you mean it's when is say "at this point the water begins to drops" and when sonic is going to to the right direction ? and after this jumping where is the "stair in cube" ?
if is that I can make probably, I will use getinterssect the Springboard and if detect water and the air timer is low to make the player jump higher on the Springboard.

But wait mario swim in the water! why to do that ? , or else you want to make mario he cant swim ?

Matt_The_Slime
Lakitu
Lakitu
Posts: 459
Joined: Wed Mar 18, 2015 2:17 pm
Contact:

Re: [LunaLua] Time limit to stay underwater

Postby Matt_The_Slime » Sat Apr 02, 2016 11:39 pm

lotus006 wrote:
Matt_The_Slime wrote:
lotus006 wrote: Can you point me in the video the time where is show this what do you mean finally I'm not sure on what u really mean :(
At about 2:38
you mean it's when is say "at this point the water begins to drops" and when sonic is going to to the right direction ? and after this jumping where is the "stair in cube" ?
if is that I can make probably, I will use getinterssect the Springboard and if detect water and the air timer is low to make the player jump higher on the Springboard.

But wait mario swim in the water! why to do that ? , or else you want to make mario he cant swim ?
Yep (PS: This isn't my video, I just found a video on labrynth zone)
And what I had in mind is to make Mario have underwater physics like Sonic does, so he jumps higher, and slower, for episodes like Sonic

lotus006
Spike
Spike
Posts: 284
Joined: Thu Sep 24, 2015 12:59 am

Re: [LunaLua] Time limit to stay underwater

Postby lotus006 » Sun Apr 03, 2016 12:17 am

Matt_The_Slime wrote:
lotus006 wrote:
Matt_The_Slime wrote: At about 2:38
you mean it's when is say "at this point the water begins to drops" and when sonic is going to to the right direction ? and after this jumping where is the "stair in cube" ?
if is that I can make probably, I will use getinterssect the Springboard and if detect water and the air timer is low to make the player jump higher on the Springboard.

But wait mario swim in the water! why to do that ? , or else you want to make mario he cant swim ?
Yep (PS: This isn't my video, I just found a video on labrynth zone)
And what I had in mind is to make Mario have underwater physics like Sonic does, so he jumps higher, and slower, for episodes like Sonic
Ah ok thanks for the info, I'm not sure I will be able to do this without the adress offsets of the gravity of the player. I already found one but the adress
are dynamic and didnt have the courage to retry to found it lol :( , I know the gravity value is easily found with Clown car Idk why but the value for hint
if some one want to try to find it is 0.0 to 3.0 to make the player fly to the ceilling and -0.1 to -3.0 to high gravity.

Probably in a update Smbx 2.0+ if they make doable I will make it :S

lotus006
Spike
Spike
Posts: 284
Joined: Thu Sep 24, 2015 12:59 am

Re: [LunaLua] Time limit to stay underwater

Postby lotus006 » Tue Apr 12, 2016 3:20 am

Finally LsBreathmeter2 !! With almost bugless

Patch note : Download link will coming soon in a day or two. need to remove in the code debug bloating stuff.
> Hud go back to the other player and show incorrect air value [Fixed]
> Remasterised Hud for better performance [Updated]
> Lua code improved and optimised again :D [Updated]
> Work as well on Single-Player, Multi-Player, and Battle Mode :D [Updated]

pixelgegner
Spiny
Spiny
Posts: 25
Joined: Mon Apr 04, 2016 5:33 pm
Contact:

Re: [LunaLua] Time limit to stay underwater

Postby pixelgegner » Tue Apr 12, 2016 4:27 am

amazing work!!
I watched every video since the first post. very well done!

will this patch be additional like it is actually or will it included as an optional feature in SMBX2?

Alagirez
Ludwig von Koopa
Ludwig von Koopa
Posts: 3624
Joined: Tue Dec 02, 2014 2:28 am
Flair: Legalize Awooo!
Pronouns: He/Him/That wolf
Contact:

Re: [LunaLua] Time limit to stay underwater

Postby Alagirez » Tue Apr 12, 2016 4:30 am

Prado you never told me that you updated this thing >:(
Btw, the new update looks better than before. I will use this.

lotus006
Spike
Spike
Posts: 284
Joined: Thu Sep 24, 2015 12:59 am

Re: [LunaLua] Time limit to stay underwater

Postby lotus006 » Tue Apr 12, 2016 4:42 am

pixelgegner wrote:amazing work!!
I watched every video since the first post. very well done!

will this patch be additional like it is actually or will it included as an optional feature in SMBX2?
Thanks for the smbx 2.0 I am not sure everything is depending of Horikawa if she got the time and also
how my progress on optimizing code will be, but for now I'm positif if it's not in that one probably in the next update.
Camacho wrote:Prado you never told me that you updated this thing >:(
Btw, the new update looks better than before. I will use this.
it's normal Prado is not continuing the coding on the new version
because he is missing time :(, he left to me to continue this :P since the hud :P that's why is no text anymore.

@for all
I need some feed back if some one have tried and see bug and if it's work well on his smbx :P
Thanks in advance.

pixelgegner
Spiny
Spiny
Posts: 25
Joined: Mon Apr 04, 2016 5:33 pm
Contact:

Re: [LunaLua] Time limit to stay underwater

Postby pixelgegner » Tue Apr 12, 2016 4:51 am

I will test it after the release of the final patch 8-)

lotus006
Spike
Spike
Posts: 284
Joined: Thu Sep 24, 2015 12:59 am

Re: [LunaLua] Time limit to stay underwater

Postby lotus006 » Tue Apr 12, 2016 11:07 am

Patch note 2 : Enjoy Final Release LsBreathMeter2.A.zip --> See my next post for the Download Link please thnx or download this one
https://drive.google.com/open?id=0B9Yha ... HZSbHlvV1k
> Hud go back to the other player and show incorrect air value [Fixed]
> Remasterised Hud for better performance [Updated]
> Lua code improved and optimised again :D [Updated]
--------------------------------------------------------------------------------------------------
New Stuff
> Added API command for adjusting and control Breath time and/or can be Enabled or Disabled now [Added]
> Added Button "CTRL" for invisible flooding the level to test easier the API [Added]

You need to put this into your lunaworld from the episode wanted. or in the folder battle for Battle Mode

Code: Select all

local LsBreathMeter = API.load("LsBreathMeter");    -- Thanks to Enjl  , it's fixed 
Put this on onLoad section ( OPTIONAL Not needed if you wont change thing... ) Sorry forgot to say.

Code: Select all

function onStart()  -- Fixed Also ,thanks again Enjl :D
LsBreathMeter.AirMultiplierP1(Multiplier) -- Settings API for Adjusting Time decreasing of the Breath --> 1 or less decreasing slower, 1 and more decreasing faster.
LsBreathMeter.AirMultiplierP2(Multiplier)
LsBreathMeter.hudBreath(true/false) -- Enable/Disable API
LsBreathMeter.ControlFlood(true/false) -- Enable/Disable Flooding level (invisible flooding) for both player when pressing CTRL , if Disabled CTRL dont flood
end  
Misc --> put this IF YOU WANT TO USE WITH YOUR API, or else not needed ... into your API to access on the Air time for player(s) wanted

Code: Select all

LsBreathMeter = loadSharedAPI("LsBreathMeter");
[ Note : should be on onTick() or onLoop() ]

Code: Select all

LsBreathMeter.ReturnAirTimeP1()
LsBreathMeter.ReturnAirTimeP2() 
Last edited by lotus006 on Wed Apr 13, 2016 12:07 pm, edited 13 times in total.

pixelgegner
Spiny
Spiny
Posts: 25
Joined: Mon Apr 04, 2016 5:33 pm
Contact:

Re: [LunaLua] Time limit to stay underwater

Postby pixelgegner » Wed Apr 13, 2016 8:11 am

I didn't get it to work yet, but I think it was my bad.

1. When I downloaded SMBX2.0 I have to update LunaLua, right? (I didn't do that yesterday)
2. I have to rewrite the "API-Load command", right? ( like it was said here)
-->
PixelPest from the general thread wrote:Also make sure that you're using API.load instead of loadAPI

Sorry I completly underrated this and I'm new to LunaLua. I'll do my best to make it work tonight.
If you have alterned suggestions & tipps for me, tell me, your definitly welcome :)

lotus006
Spike
Spike
Posts: 284
Joined: Thu Sep 24, 2015 12:59 am

Re: [LunaLua] Time limit to stay underwater

Postby lotus006 » Wed Apr 13, 2016 11:37 am

pixelgegner wrote:I didn't get it to work yet, but I think it was my bad.

1. When I downloaded SMBX2.0 I have to update LunaLua, right? (I didn't do that yesterday)
2. I have to rewrite the "API-Load command", right? ( like it was said here)
-->
PixelPest from the general thread wrote:Also make sure that you're using API.load instead of loadAPI

Sorry I completly underrated this and I'm new to LunaLua. I'll do my best to make it work tonight.
If you have alterned suggestions & tipps for me, tell me, your definitly welcome :)
Please redownload again the API, I made an error with the WaterFlood code in SP. Now it good :D
https://drive.google.com/open?id=0B9Yha ... HZSbHlvV1k
about Lunaworld.lua
do this -->

Code: Select all

LsBreathMeter = loadAPI("LsBreathMeter");
   
function onLoad()
  	 
end



function onLoop()
 
end
	
Last edited by lotus006 on Wed Apr 13, 2016 11:56 am, edited 1 time in total.

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9891
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: [LunaLua] Time limit to stay underwater

Postby Emral » Wed Apr 13, 2016 11:55 am

lotus006 wrote: You need to put this into your lunaworld from the episode wanted. or in the folder battle for Battle Mode

Code: Select all

LsBreathMeter = loadAPI("LsBreathMeter"); 
two things:
-use API.load or loadSharedAPI
-make LSBreathMeter local
lotus006 wrote: Put this on onLoad section

Code: Select all

function onLoad()
LsBreathMeter.AirMultiplierP1(Multiplier) -- Settings API for Adjusting Time decreasing of the Breath --> 1 or less decreasing slower, 1 and more decreasing faster.
LsBreathMeter.AirMultiplierP2(Multiplier)
LsBreathMeter.hudBreath(true/false) -- Enable/Disable API
LsBreathMeter.ControlFlood(true/false) -- Enable/Disable Flooding level (invisible flooding) for both player when pressing CTRL , if Disabled CTRL dont flood
end  
use onStart. OnLoad is kinda broken.
lotus006 wrote: Misc --> put this into your API to access on the Air time for player(s) wanted [ Note : should be on onTick() or onLoop() ]

Code: Select all

LsBreathMeter = loadSharedAPI("LsBreathMeter");

Code: Select all

LsBreathMeter.ReturnAirTimeP1()
LsBreathMeter.ReturnAirTimeP2() 
You don't need to load the API AGAIN in onTick, every frame, until the end of time. That's just dumb.


_________________________________
lotus006 wrote: about Lunaworld.lua
do this -->

Code: Select all

local LsBreathMeter = API.load("LsBreathMeter");
fixed your code.

lotus006
Spike
Spike
Posts: 284
Joined: Thu Sep 24, 2015 12:59 am

Re: [LunaLua] Time limit to stay underwater

Postby lotus006 » Wed Apr 13, 2016 12:05 pm

Thanks Enjl , stuff is fixed now please re download the link on my second post after the release. or Ill put another one in the principal post also

pixelgegner
Spiny
Spiny
Posts: 25
Joined: Mon Apr 04, 2016 5:33 pm
Contact:

Re: [LunaLua] Time limit to stay underwater

Postby pixelgegner » Tue Apr 19, 2016 3:08 pm

Nice, that fixed it! It is super easy to set up now. Thanks.
Spoiler: show
Image

lotus006
Spike
Spike
Posts: 284
Joined: Thu Sep 24, 2015 12:59 am

Re: [LunaLua] Time limit to stay underwater

Postby lotus006 » Wed Apr 20, 2016 6:50 am

pixelgegner wrote:Nice, that fixed it! It is super easy to set up now. Thanks.
Spoiler: show
Image
Thanks for the feedback, it's good to see it's working well elsewhere than me :D
If you have more suggestion to ask don't be shy, I'm bored I dont know what to do now :D lol
I want to do something :P

But I was trying to make an big menu shop base on Salmon lakitu 2.0 where was show in the
smbx 2.0 thread from Horikawa video :)

pixelgegner
Spiny
Spiny
Posts: 25
Joined: Mon Apr 04, 2016 5:33 pm
Contact:

Re: [LunaLua] Time limit to stay underwater

Postby pixelgegner » Wed Apr 20, 2016 7:14 am

I've already seen it and I like your version more. Especially I don't like the look of the Wario Lakitu :D
You're menu is even smaller so you never feel like 'pause' or 'break' the game. It feels smoother to me.

What's about this?
lotus006 wrote:Do you have any other request ? (probably I will try to debug Hex to find the 2nd player when he go in water too, if it's possible)
  • adding support for 2nd player
    Maybe find a way to add when coins is taken air will be added more
    Is there a way to detect when is the players where is in a full level of water ?
    Attaching this to the future menu I will try to release soon for more toggable ?
Is it possible to refresh air by collecting coins?


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari