How do i modify the run speed of one character

Post here for help and support regarding LunaLua and SMBX2's libraries and features.

Moderator: Userbase Moderators

Saric
Spiny
Spiny
Posts: 26
Joined: Fri Jan 28, 2022 8:20 am
Pronouns: whatever you want
Contact:

How do i modify the run speed of one character

Postby Saric » Thu Jul 07, 2022 5:42 pm

I'm trying to modify the speed of toad in lunalua

Chilly14
Snifit
Snifit
Posts: 236
Joined: Thu Jul 18, 2019 10:28 pm
Flair: wash your hands and stay at home
Pronouns: he/him

Re: How do i modify the run speed of one character

Postby Chilly14 » Thu Jul 07, 2022 5:57 pm

You can use Defines.player_walkspeed and Defines.player_runspeed like so:

Code: Select all

function onStart()
	if player.character == 4 then
		Defines.player_walkspeed = 6
		Defines.player_runspeed = 9
	end
end
Also, questions like this should go in LunaLua Help.
Last edited by Chilly14 on Thu Jul 07, 2022 6:04 pm, edited 1 time in total.

Saric
Spiny
Spiny
Posts: 26
Joined: Fri Jan 28, 2022 8:20 am
Pronouns: whatever you want
Contact:

Re: How do i modify the run speed of one character

Postby Saric » Thu Jul 07, 2022 6:01 pm

Thanks, a lot


Return to “LunaLua Help”

Who is online

Users browsing this forum: No registered users and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari