[LunaLua] Peach Flying

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?
DarkShadeX
Volcano Lotus
Volcano Lotus
Posts: 535
Joined: Sat Jan 18, 2014 11:34 am

[LunaLua] Peach Flying

Postby DarkShadeX » Thu May 28, 2015 12:55 pm

Found this old code while removing stuff from my hard drive.
This Script basically allows Peach to fly while she's in her racoon form like Mario and Co.
Before i remove this code from the hard drive,i aswell just release it here.

Code: Select all

-- SMBX - Peach flying Script by DarkShadeX
 
-- 0x1C = Princess hover timer
-- 0x16E = Is flying
-- 0xF0 = Player identity index (0 = nothing! don't use, 1 = demo, 2 = iris, 3 = princess, 5 = sheath)
local fly_lenght = 80 -- How long you can fly,adjust it so its perfect for you ;)
local remaining_fly = fly_lenght
 
function onLoop()
 
        printText("RUNNING "..tostring(remaining_fly).." FRAMES", 30, 60)
 
        -- If you Hover,prevent that you can fly:
        if( player:mem(0x1C,FIELD_WORD) >= 1 )then
                remaining_fly = 0
        end
 
        -- Check if Stuff ... :
        if( player:mem(0x1C,FIELD_WORD) == 0 and player.speedY ~= 0 and remaining_fly >= 0 and player:mem(0xF0,FIELD_WORD) == 3 and player.speedX >= 5.55 and player.powerup == PLAYER_LEAF)then
                player:mem(0x16E,FIELD_WORD,-1) -- LET THE FLY BEGIN :>
                remaining_fly = remaining_fly - 0.25  -- Reduce our flying timer.
        end
        -- Check if Stuff ... LEFT :
        if( player:mem(0x1C,FIELD_WORD) == 0 and player.speedY ~= 0 and remaining_fly >= 0 and player:mem(0xF0,FIELD_WORD) == 3 and player.speedX <= -5.55 and player.powerup == PLAYER_LEAF)then
                player:mem(0x16E,FIELD_WORD,-1) -- LET THE FLY BEGIN :>
                remaining_fly = remaining_fly - 0.25  -- Reduce our flying timer.
        end
        -- End the Flying:
        if( remaining_fly <= 1 )then -- If you don't have any flying timer anymore...
                player:mem(0x16E,FIELD_WORD,0) -- Stop the Flying.
        end
 
        -- Extra Fixes:
        if( remaining_fly <= fly_lenght and player:mem(0x16E,FIELD_WORD) == -1 )then -- So the counter doesnt stop if you change the direction ;)
                remaining_fly = remaining_fly - 0.25
        end
end
 
function onJumpEnd()
        remaining_fly = fly_lenght -- Reset the counter if you fall.
end

h2643
Reznor
Reznor
Posts: 2890
Joined: Sat Dec 21, 2013 7:23 am
Contact:

Re: [LunaLua] Peach Flying

Postby h2643 » Thu May 28, 2015 1:11 pm

So that hidden flying Peach frame can finally be used with this code... thank you!

MECHDRAGON777
Pink Yoshi Egg
Pink Yoshi Egg
Posts: 6422
Joined: Fri Dec 20, 2013 6:40 pm
Flair: Nuclear Queen of Reversion.
Contact:

Re: [LunaLua] Peach Flying

Postby MECHDRAGON777 » Thu May 28, 2015 9:11 pm

h2643 wrote:So that hidden flying Peach frame can finally be used with this code... thank you!
Should I also release he fixed Peach Sprite that goes with this? [that hidden frame is broken. it is the exact same thing three times...] I used this code in a contest!

Wohlstand
Chargin' Chuck
Chargin' Chuck
Posts: 2008
Joined: Tue Feb 11, 2014 4:44 pm
Flair: [ˈvoːlˌʃtant], 狐エンジニア
Pronouns: he/him
Contact:

Re: [LunaLua] Peach Flying

Postby Wohlstand » Fri May 29, 2015 3:55 am

If you will use cheat code "wingman", Peach will fly like Mario natively (but with unlimited time due this cheat code), even will be used special frames! The purpose is make this thing available even without cheat

FanofSMBX
Ludwig von Koopa
Ludwig von Koopa
Posts: 3878
Joined: Sun Dec 22, 2013 12:01 pm

Re: [LunaLua] Peach Flying

Postby FanofSMBX » Fri May 29, 2015 11:24 am

I hope you make more awesome codes like this. :)

MECHDRAGON777
Pink Yoshi Egg
Pink Yoshi Egg
Posts: 6422
Joined: Fri Dec 20, 2013 6:40 pm
Flair: Nuclear Queen of Reversion.
Contact:

Re: [LunaLua] Peach Flying

Postby MECHDRAGON777 » Sat May 30, 2015 9:09 pm

Wohlstand wrote:If you will use cheat code "wingman", Peach will fly like Mario natively (but with unlimited time due this cheat code), even will be used special frames! The purpose is make this thing available even without cheat
Yeah! And the fact that the sprites is the same is not fun either! (I have the fixed version of the default Peach)

Creepermon
Hoopster
Hoopster
Posts: 46
Joined: Sun Dec 20, 2015 12:55 pm

Re: [LunaLua] Peach Flying

Postby Creepermon » Thu Jun 16, 2016 2:48 pm

Is it possible to give her a spinjump as well?

MECHDRAGON777
Pink Yoshi Egg
Pink Yoshi Egg
Posts: 6422
Joined: Fri Dec 20, 2013 6:40 pm
Flair: Nuclear Queen of Reversion.
Contact:

Re: [LunaLua] Peach Flying

Postby MECHDRAGON777 » Thu Jun 16, 2016 4:07 pm

Creepermon wrote:Is it possible to give her a spinjump as well?
I did it in my Kaizo contest level that got fourth place. The episode comes out soon by PixelPest. Ask
bossedit8 wrote:
to give you the code since I gave it to him a while ago.

Edit: looking through my sent PMs to bossedit, I found this.

Peach Spin-jump

Code: Select all

function onInputUpdate()
    if player.altJumpKeyPressing == true and player:mem(0x12E, FIELD_WORD) == 0 and (player:mem(0x146, FIELD_WORD) ~= 0 or player:mem(0x48, FIELD_WORD) ~= 0 or player:mem(0x176, FIELD_WORD) ~= 0) then
        player:mem(0x50, FIELD_WORD, -1)
        local myTailSound = Audio.SfxOpen("tail.ogg")
        Audio.sounds[1].sfx = myTailSound
    end
    if player.jumpKeyPressing == true then
        Audio.sounds[1].sfx = nil
    end
end

Julia Pseudo
Luigi
Luigi
Posts: 5609
Joined: Wed Jan 08, 2014 12:04 am
Flair: gay gaymer girl
Pronouns: She/her

Re: [LunaLua] Peach Flying

Postby Julia Pseudo » Fri Jun 17, 2016 2:09 am

Moved to LunaLua, since this thread is about LunaLua.


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 2 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari