Tilt Cannons

Share and discuss custom LunaLua code and content packs for SMBX2.
Master of Disaster
Rex
Rex
Posts: 37
Joined: Sun Nov 28, 2021 9:29 am
Flair: Average Koopa Fan
Pronouns: he/him

Tilt Cannons

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

Tilt Cannons - v1.1
May I introduce to you my very first custom block pack , which just got the biggest 1.1 update imaginable, Tilt Cannons!
Enter the pipe, tilt the cannon in the direction you want it and get blasted out!
They kind of work like the ones of Super Mario 64 or the New Super Mario Bros Wii Mushroom Houses

Works with every vanilla character except Peach because Redigit hates fun.

It features Tiltcannons in 4 directions! Mortars that send you drilling to earth's core! And Automatic cannons for all of you helicopter level designers!

What's new in Update 1.1? ALMOST EVERYTHING!
- New Cannon sprites (made by Squishy Rex)!
- Overhauled shooting, being actually faithful now! (Yes it was not really right before, yikes)
- An optional arrow indicator that shows where you are shooting to!
- Upside Down Cannons!
- Left and Right facing cannons!
- Automatic Cannons, that automatically shoot you in a preselected angle!
- You can now fly from cannon to cannon!
- CustomCamera.lua support, making them render properly when zooming out!
- Fully functioning moving cannons (via Moving Layers or lua)!
- Visual effects when getting shot!
- Better visuals for drilling down via a Mortar!

The very complex controls:
Rotate by holding left or right - or up and down if it's a sideways cannon
Press the UP Key to get shot - or the down, left or right, depending on the cannon's rotation
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.
Left limits counter-clockwise rotation.
Right limits clockwise rotation.

Power:
The value defines how long the player flies in a straight line and how fast they do. 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 won't get anywhere.
If the player touches a flight canceller hits the ground or the ceiling, the player stops flying in a straight line and regains control.
Only mildly effects the flight if the Mortar setting 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 only mildly by Power.

Visual Aid:
When ticked, an arrow will move from the cannon, indicating where the player will be flying to.
The Arrow particle only appears when the cannon is not currently rotating.

Mirrored:
When ticked, the cannon will be facing the other direction.
That means if it is an upwards-facing cannon, it will face downwards.
If it is a leftwards-facing cannon, it will face rightwards.

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

Earth's Core any%
Image

Mario can be a bouncy boiii if you want
Image

Automatic Cannons? Upside Down Cannons? Sideways Cannons? We got it all!
Image

Uneven gunpowder distribution and moving cannons!
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)
If you (for whatever reason) don't want built-in customCamera.lua support, just rename tiltcannons2.lua into tiltcannons.lua and do whatever you would do to the original tiltcannons.lua file.

You want to use them?
Then here you go (Version 1.1):
https://www.dropbox.com/scl/fo/r57pdyfs ... rghce6p74f

You want (for whatever reason) the first version? Oke then, here's the link.
https://www.dropbox.com/sh/vkhf4ztqydxy ... uAlfa?dl=0
Please credit me if used, or else you will make a turtle very sad ):

You know how it goes, feel free to use it but do not feel free to sell it as your own. Just credit.
Speaking of Credits:
Script by me, "Master" of Disaster
Sprites by Squishy Rex,
CustomCamera.lua by Mr.DoubleA
Also, thanks to KBM-Quine, Marioman2007 and Mr.DoubleA for helping me out massively!

If you encounter any bugs, notify me and I can see if I can fix it!
Last edited by Master of Disaster on Mon Feb 20, 2023 5:25 am, edited 4 times in total.

Mal8rk
Snifit
Snifit
Posts: 200
Joined: Mon Oct 25, 2021 11:04 pm
Flair: English Speaking Spanish Speaker
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
Lakitu
Lakitu
Posts: 474
Joined: Tue Aug 25, 2020 3:19 am
Flair: Dr. Bones
Pronouns: He/Him

Re: Tilt Cannons

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

Amazing script!

Emral
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 9737
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Phoenix

Re: Tilt Cannons

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

an optional visualization of the shoot arc would be awesome

Master of Disaster
Rex
Rex
Posts: 37
Joined: Sun Nov 28, 2021 9:29 am
Flair: Average Koopa Fan
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
Rex
Rex
Posts: 37
Joined: Sun Nov 28, 2021 9:29 am
Flair: Average Koopa Fan
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: 1071
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: 215
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.

Master of Disaster
Rex
Rex
Posts: 37
Joined: Sun Nov 28, 2021 9:29 am
Flair: Average Koopa Fan
Pronouns: he/him

Re: Tilt Cannons

Postby Master of Disaster » Mon Feb 20, 2023 5:58 am

Wiimeiser wrote:
Mon Aug 29, 2022 8:43 am
Now if only you could enter them via a clear pipe. That would be neat.
Hmm I could look into that for a 1.2 update. It most probably won't be as huge as the first update though lol

lugiaTheAntarticLord
Bob-Omb
Bob-Omb
Posts: 21
Joined: Wed Jun 10, 2020 3:24 pm

Re: Tilt Cannons

Postby lugiaTheAntarticLord » Thu May 23, 2024 5:21 pm

How do i fix the arrow indicators being slow?


Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 0 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari