SMB3 Angry Sun (Custom LunaLua API)

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?
Valtteri
Van De Graf
Van De Graf
Posts: 2150
Joined: Sun Dec 01, 2013 1:16 pm

SMB3 Angry Sun (Custom LunaLua API)

Postby Valtteri » Thu Mar 03, 2016 6:58 pm

This is my second LunaLua API. Note that if you downloaded my level (Nighttime Wasteland) for this API you have an outdated version. I have edited this API to be more compatible with different levels.

It behaves very closely to SMB3. It whirls for 1-5 times in one corner, sweeps through the bottom part of the screen and to the other corner and whirls again and sweeps back to where it started. It will stick to the player's vertical position and a fixed horizontal position in the section. It can't be killed with fireballs. Concerning the outside-SMB3 physics: You can spinjump on it. You can't eat it with Yoshi. You can sword kill it. You can't kill it with the Ice Flower.



To use:
  • Extract the files from the download below to your level folder, create a "lunadll.lua" host file and put the following code in it:

    Code: Select all

    local angrySun=loadAPI("angrysun")
    function onStart()
        angrySun.setSections({0})
    end
  • setSections takes a table of numbers that represent the sections where you want the Angry Sun to be. The number must be the section number minus one. The above code only makes them spawn in section 1 for example. To make them spawn in sections 1, 5 and 6 for example, the code would look like this:

    Code: Select all

    local angrySun=loadAPI("angrysun")
    function onStart()
        angrySun.setSections({0,4,5})
    end
  • You must create an event called "Angry Sun Dead".
  • You should place an inactive (or active if you want it to start as active; the inactive Angry Sun replaces the SMW Spiny and the active one replaces the SMB3 Spiny) Angry Sun in the editor three blocks from the left border of the player's screen and 15 blocks from the bottom border of the section. If you don't do this, he will die if the player exits the section for a secret room for example. If you're okay with this, this isn't required. If you do this though, you must have his death trigger the event "Angry Sun Dead".
  • The Angry Sun will be inactive by default. He will stick to the top left corner of the player's screen until he is activated, which is when he will begin swirling about. To activate him you need to create an event called "Angry Sun" and place an NPC that will activate the event where you want the Angry Sun to activate. If you want him to be active from the beginning, make Level Start trigger the event.
  • setHeight sets the height of the Angry Sun from the bottom of the screen. If you don't use it, like in the above examples, the height will be 480 which I found to be optimal. If you want to change it to, say, 1000 for some reason, you can do it like this:

    Code: Select all

    local angrySun=loadAPI("angrysun")
    function onStart()
        angrySun.setSections({0})
        angrySun.setHeight(1000)
    end
http://www.mediafire.com/download/pyho7k97eqv2oo8/

timocomsmbx2345
Nipper
Nipper
Posts: 850
Joined: Sat Feb 06, 2016 1:44 pm
Contact:

Re: SMB3 Angry Sun (Custom LunaLua API)

Postby timocomsmbx2345 » Thu Feb 16, 2017 3:54 pm

That's great. but how about Fire Snakes?

Sambo
Snifit
Snifit
Posts: 208
Joined: Fri Jan 24, 2014 6:43 pm

Re: SMB3 Angry Sun (Custom LunaLua API)

Postby Sambo » Thu Mar 09, 2017 11:28 pm

This looks pretty good. Is this stuff gonna be in 2.0?

(On an unrelated subject, I nominate timocomsmbx2345 for the worst signature ever. Seriously, man. Put that thing in a spoiler or something.)

timocomsmbx2345
Nipper
Nipper
Posts: 850
Joined: Sat Feb 06, 2016 1:44 pm
Contact:

Re: SMB3 Angry Sun (Custom LunaLua API)

Postby timocomsmbx2345 » Sat Mar 11, 2017 6:10 pm

Sambo wrote:This looks pretty good. Is this stuff gonna be in 2.0?

(On an unrelated subject, I nominate timocomsmbx2345 for the worst signature ever. Seriously, man. Put that thing in a spoiler or something.)
Yeah, and even Valerriti PM'd me about this, but i fixed it.

ElectriKong
Posts: 4650
Joined: Mon Jun 06, 2016 4:32 pm
Flair: I have NO idea what to put here
Pronouns: he/him
Contact:

Re: SMB3 Angry Sun (Custom LunaLua API)

Postby ElectriKong » Tue May 16, 2017 2:57 pm

I tried this but the angry sun just disappears upon starting the level.

Quantix
Ripper II
Ripper II
Posts: 333
Joined: Tue Jan 26, 2016 5:04 pm

Re: SMB3 Angry Sun (Custom LunaLua API)

Postby Quantix » Wed May 17, 2017 4:42 pm

King of Eterity wrote:I tried this but the angry sun just disappears upon starting the level.
Did you specify what section the angry sun appears in? You know, something like this:

Code: Select all

function onStart()
    angrySun.setSections({0})
end
Remember that Section 0 in Lua means Section 1 and so on.

ElectriKong
Posts: 4650
Joined: Mon Jun 06, 2016 4:32 pm
Flair: I have NO idea what to put here
Pronouns: he/him
Contact:

Re: SMB3 Angry Sun (Custom LunaLua API)

Postby ElectriKong » Wed May 17, 2017 4:43 pm

Quantix wrote:
King of Eterity wrote:I tried this but the angry sun just disappears upon starting the level.
Did you specify what section the angry sun appears in? You know, something like this:

Code: Select all

function onStart()
    angrySun.setSections({0})
end
Remember that Section 0 in Lua means Section 1 and so on.
I did 0,2,3 so that it would spawn in sections 1,3 and 4

ElectriKong
Posts: 4650
Joined: Mon Jun 06, 2016 4:32 pm
Flair: I have NO idea what to put here
Pronouns: he/him
Contact:

Re: SMB3 Angry Sun (Custom LunaLua API)

Postby ElectriKong » Wed May 17, 2017 5:13 pm

Does this API work in 2.0 because I tried Nighttime Wasteland and no angry sun?

ElectriKong
Posts: 4650
Joined: Mon Jun 06, 2016 4:32 pm
Flair: I have NO idea what to put here
Pronouns: he/him
Contact:

Re: SMB3 Angry Sun (Custom LunaLua API)

Postby ElectriKong » Wed May 17, 2017 5:19 pm

Wow, now I realise how outdated as fuck this is. It has the wrong API loading function and even the right one (API.load) does not work. So basically this needs to be redone so it works in 2.0 beta 3.

Gmoney6422
Goomba
Goomba
Posts: 3
Joined: Sat Aug 09, 2014 6:00 pm
Contact:

Re: SMB3 Angry Sun (Custom LunaLua API)

Postby Gmoney6422 » Fri Jul 27, 2018 2:51 am

How do I get it to not spawn in different rooms?


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 3 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari