Wind effect using lunalua

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?
User avatar
ShaolinTrunks
Bob-omb
Bob-omb
Posts: 30
Joined: Mon Mar 06, 2017 9:45 pm
Current Project: Teen Trunks Adventures
Chat Username: ShaolinTrunks

Wind effect using lunalua

Postby ShaolinTrunks » Sat Mar 25, 2017 9:17 am

Clips you through Walls! This is a wind effect I found using lunalua. Clips you through Walls! I know this is basic information to a lot of users. For a begginner like me, I have questions about these types of things. After some research here is what I had came up for anyone who wants the same in they're level. Kevsoft posted wind.lua on the wohlsoft forum. The post was here: http://wohlsoft.ru/forum/viewtopic.php?t=329 and the link is not working. It is possible to make a wind effect using lunalua. I contacted Kevsoft on Discord. He gave some friendly advice.

I am sure you can build an API around this. For me I Put this into my lunadll.lua file for the level with wind:
Spoiler: show
function onTick()
player.x = player.x + 2
end
^ This will move your character every tick to the right. Fast speeds around (3 to 5). Try (+ 1,+ 2 ) to get lower speeds and also negative values (- 1, - 2, ) to make your character go left.

You could possibly try using this for up and down as well by typing this:
Spoiler: show
function onTick()
player.y = player.y - 1
end
Which will push you up or down, same rules as above. I haven't found a use for it yet. When it pushes you down, you don't jump as high so it can be used in that case. The pushing me up doesn't make me float, just glitches the character on the ground. Maybe could be used for falling levels so maybe you don't fall as fast, I'd like to test. Obviously this is small amount of code using lunalua and is basic. There is more ways you could use this information with all the other lunalua code to maybe turn on and off the wind in your level. Or only have wind at certain spots etc. the possibilities only limited by lunalua which I am still learning. Thanks.
Last edited by ShaolinTrunks on Sat Mar 25, 2017 6:48 pm, edited 1 time in total.
Thanks to the SMBX Community.

PixelPest
Link
Link
Posts: 7116
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Current Project: Boom Boom Evolution
Chat Username: PixelPest
Contact:

Re: Wind effect using lunalua

Postby PixelPest » Sat Mar 25, 2017 6:30 pm

This could quite possibly cause the player to clip into walls. Have you actually tested this out?

User avatar
ShaolinTrunks
Bob-omb
Bob-omb
Posts: 30
Joined: Mon Mar 06, 2017 9:45 pm
Current Project: Teen Trunks Adventures
Chat Username: ShaolinTrunks

Re: Wind effect using lunalua

Postby ShaolinTrunks » Sat Mar 25, 2017 6:41 pm

I did not test it, I just didnt see any answers online on where to start making wind. Have been learning how waddlederp did it in this level...which i did not know existed until today :P viewtopic.php?f=36&t=17410

Yea i tested it, you clip through the blocks...i need to study how to do it better.
Thanks to the SMBX Community.

User avatar
HenryRichard
Ludwig von Koopa
Ludwig von Koopa
Posts: 2846
Joined: Mon Dec 23, 2013 12:09 pm
Flair: Is this where I type my password?
Contact:

Re: Wind effect using lunalua

Postby HenryRichard » Sat Apr 15, 2017 5:21 pm

Why not modify the player's speed instead? There shouldn't be a problem with clipping through walls then, and it could potentially be more realistic (though why we would want Mario to be realistic I don't know)
Jesus is my savior.

User avatar
ShaolinTrunks
Bob-omb
Bob-omb
Posts: 30
Joined: Mon Mar 06, 2017 9:45 pm
Current Project: Teen Trunks Adventures
Chat Username: ShaolinTrunks

Re: Wind effect using lunalua

Postby ShaolinTrunks » Mon Apr 17, 2017 9:23 am

Yea dude. I have found the right resources to make a wind level using lunalua now. I just need some time off work to do other work on my levels lol.
Thanks to the SMBX Community.

User avatar
Dark Soron
Spiny
Spiny
Posts: 52
Joined: Sun Jan 29, 2017 10:34 pm
Current Project: The Dimensional War
Chat Username: Soron.exle
Contact:

Re: Wind effect using lunalua

Postby Dark Soron » Sun Apr 23, 2017 4:24 pm

HenryRichard wrote:Why not modify the player's speed instead? There shouldn't be a problem with clipping through walls then, and it could potentially be more realistic (though why we would want Mario to be realistic I don't know)
How can you pull that off? I don't remember a game code that can modify a character's movement speed. Can you give me a code that does that?

loop13
Eerie
Eerie
Posts: 980
Joined: Sun Apr 17, 2016 5:56 pm
Flair: I mainly play Celeste nowadays
Current Project: failing English IV
Chat Username: loop13uh

Re: Wind effect using lunalua

Postby loop13 » Sun Apr 23, 2017 4:32 pm

Something like playerspeed.x or something I dunno.
Hello, I make a lot of typos
specific people know my whereabouts though

my wifi is as useful as a brick

im more active on discord

:idea: I'm not (completely) dead; I rarely talk because I usually have nothin to say; I'll talk when I actually have a comment I want to make, or if someone asks me somethin...

nostalgia is a beautiful thing, isn't it?

anything before 2020 is most likely me being a weirdo or an idiot.

PixelPest
Link
Link
Posts: 7116
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Current Project: Boom Boom Evolution
Chat Username: PixelPest
Contact:

Re: Wind effect using lunalua

Postby PixelPest » Sun Apr 23, 2017 5:53 pm

Jayce 777 wrote:Something like playerspeed.x or something I dunno.
Really. You didn't even look that up. Guessing in this context usually doesn't work.

You'll want to modify player.speedX and player.speedY. (You can set them by putting one equals sign after and a number value)


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 1 guest