Wind effect using lunalua

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?
ShaolinTrunks
Fighter Fly
Fighter Fly
Posts: 30
Joined: Mon Mar 06, 2017 9:45 pm

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.

PixelPest
Link
Link
Posts: 7111
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
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?

ShaolinTrunks
Fighter Fly
Fighter Fly
Posts: 30
Joined: Mon Mar 06, 2017 9:45 pm

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.

HenryRichard
Reznor
Reznor
Posts: 2843
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)

ShaolinTrunks
Fighter Fly
Fighter Fly
Posts: 30
Joined: Mon Mar 06, 2017 9:45 pm

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.

Soronexle
Swooper
Swooper
Posts: 67
Joined: Sun Jan 29, 2017 10:34 pm
Contact:

Re: Wind effect using lunalua

Postby Soronexle » 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?

loop
Ninji
Ninji
Posts: 984
Joined: Sun Apr 17, 2016 5:56 pm
Flair: i may be dumb but im not stupid!
Pronouns: he/him/they

Re: Wind effect using lunalua

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

Something like playerspeed.x or something I dunno.

PixelPest
Link
Link
Posts: 7111
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
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

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari