Tilt Cannons

Share and discuss custom LunaLua code and content packs for SMBX2.
Master of Disaster
Shy Guy
Shy Guy
Posts: 7
Joined: Sun Nov 28, 2021 9:29 am
Pronouns: he/him

Tilt Cannons

Postby Master of Disaster » Fri Aug 12, 2022 11:49 am

Tilt Cannons - v1.0
May I introduce to you my very first custom block pack (with only two blocks lol), Tilt Cannons!
Enter the pipe, tilt the cannon in the direction you want it and get blasted out!
They work like the ones of Super Mario 64 or the New Super Mario Bros Wii Mushroom Houses

Works with every vanilla character, though SMB2 characters have slightly different physics.

The very complex controls:
Rotate by holding left or right
Press the UP Key to get shot.
If you hold run while choosing the angle, the cannon rotates faster!

Utility options (Settings and Flight Canceller):
Spoiler: show
Max Angle (left) and Max Angle (right):
The value defines the highest rotation (in degrees) the tilt cannon can reach.
If the Base of your cannon is fully covered by ground on one side, you should set max angle on that side to 15.
If the Base of your cannon is half covered by ground on one side, you should set max angle on that side to 60.
A value over 90 is only recommended if there are no blocks right beneath it.

Power:
The value defines how long the player flies in a straight line. The higher the value, the further the cannon shoots the player.
The player is invulnerable while flying in a straight line, hurting enemies on their way.
If the value is 0, you will reach the same height as when shot out of a mortar and won't fly in a straigt line at all.
If the player touches a flight canceller hits the ground or the ceiling, the player stops flying in a straight line and regains control.
Doesn't affect the flight, if the Mortar is ticked.

Elasticity:
When hitting a wall, you will bounce off in the other direction.
The value defines how much of your momentum keeps when hitting a wall.
A value of 1 doesn't make you lose any of your momentum when bouncing.
A value of 0 doesn't bounce you off a wall at all.
Doesn't affect the flight, if the Mortar is ticked.

Mortar:

When ticked, the player performs a mighty ground pound when getting shot.
Until they hit solid ground, the player is able to tear through blocks without stopping.
A Mortar is not affected by the values of Elasticity and Power.

Flight Canceller:
When touched, the player will stop flying and regains control, is no longer invulnerable though.
Invisible ingame.

Some gifs to get a better idea of it:
Spoiler: show
Image
Image
Mortars are red, cannons are gray, but these things don't blast you away!
Image
Image
Drill into a cannon and it will work as a Mortar as well
Image
Someone didn't balance the gunpowder distribution...
Image
Note: I used MDA's little dialogue as well as his custom camera system (for zooming out)
How to use:
You just have to copy the files of the Tilt Cannons into your episode's or level's folder, reload the editor and you have it listed in the Custom Tilesets.
Place it down, set the values you want and have fun getting blasted away! (Don't cover the cannon in blocks please)

You want to use them?
Then here you go:
https://www.dropbox.com/sh/vkhf4ztqydxy ... uAlfa?dl=0
Please credit me if used, or else you will make a turtle very sad ):
Also, thanks to Marioman for help with the rotation code!

If you encounter any bugs, notify me and I can see if I can fix it!
Last edited by Master of Disaster on Sun Aug 14, 2022 8:36 am, edited 1 time in total.

Mal8rk
Tweeter
Tweeter
Posts: 154
Joined: Mon Oct 25, 2021 11:04 pm
Flair: I like socializing with people online
Pronouns: He/Him
Contact:

Re: Tilt Cannons

Postby Mal8rk » Fri Aug 12, 2022 5:19 pm

This is awesome! I can finally make that Bob-Omb Battlefield recreation I've always wanted to make!

Marioman2007
Buster Beetle
Buster Beetle
Posts: 401
Joined: Tue Aug 25, 2020 3:19 am
Pronouns: He/Him

Re: Tilt Cannons

Postby Marioman2007 » Sat Aug 13, 2022 7:40 am

Amazing script!

Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9491
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: Tilt Cannons

Postby Enjl » Sat Aug 13, 2022 12:10 pm

an optional visualization of the shoot arc would be awesome

Master of Disaster
Shy Guy
Shy Guy
Posts: 7
Joined: Sun Nov 28, 2021 9:29 am
Pronouns: he/him

Re: Tilt Cannons

Postby Master of Disaster » Sat Aug 13, 2022 3:10 pm

Enjl wrote:
Sat Aug 13, 2022 12:10 pm
an optional visualization of the shoot arc would be awesome
Indeed, this would be really cool. I have kind of an idea how it could work but it would require parity between players (or else it'd be useless), which I could only somewhat simulate (or find out how to change the physics of the player when flying).
I'll try my best to do this though!

Registered sand eater
Swooper
Swooper
Posts: 55
Joined: Fri Jan 28, 2022 4:14 pm
Pronouns: he/him

Re: Tilt Cannons

Postby Registered sand eater » Sun Aug 14, 2022 6:28 am

Ayy, it was fun watching you progress with it on the SMBX Discord. Now, with AutumnMood's cards I can make a cool toad house minigame!


(Please add the max strength gif)

Master of Disaster
Shy Guy
Shy Guy
Posts: 7
Joined: Sun Nov 28, 2021 9:29 am
Pronouns: he/him

Re: Tilt Cannons

Postby Master of Disaster » Sun Aug 14, 2022 8:36 am

Registered sand eater wrote:
Sun Aug 14, 2022 6:28 am
Ayy, it was fun watching you progress with it on the SMBX Discord. Now, with AutumnMood's cards I can make a cool toad house minigame!


(Please add the max strength gif)
Thanks ^^
Also, wish granted

AirShip
Panser
Panser
Posts: 1036
Joined: Wed Jan 01, 2014 1:30 am
Flair: The Flying Ghost
Contact:

Re: Tilt Cannons

Postby AirShip » Sun Aug 14, 2022 1:36 pm

I reused an old gfx of the SM64 cannons I had made, for a SMB3 Styled alternative:
Spoiler: show
Image


for anyone interested:
https://www.dropbox.com/s/898re5hong8v6 ... t.zip?dl=0

Also, nice cannons you have there, good work, indeed.

Registered sand eater
Swooper
Swooper
Posts: 55
Joined: Fri Jan 28, 2022 4:14 pm
Pronouns: he/him

Re: Tilt Cannons

Postby Registered sand eater » Tue Aug 16, 2022 3:05 am

AirShip wrote:
Sun Aug 14, 2022 1:36 pm
I reused an old gfx of the SM64 cannons I had made, for a SMB3 Styled alternative:
Spoiler: show
Image

for anyone interested:
https://www.dropbox.com/s/898re5hong8v6 ... t.zip?dl=0

Also, nice cannons you have there, good work, indeed.
Exactly what I thought when I saw the tilt cannons on discord.

Wiimeiser
Snifit
Snifit
Posts: 211
Joined: Mon Jun 24, 2019 4:36 am
Flair: What?

Re: Tilt Cannons

Postby Wiimeiser » Mon Aug 29, 2022 8:43 am

Now if only you could enter them via a clear pipe. That would be neat.


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 1 guest