Page 1 of 1

Tilt Cannons

Posted: Fri Aug 12, 2022 11:49 am
by Master of Disaster
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!

Re: Tilt Cannons

Posted: Fri Aug 12, 2022 5:19 pm
by Mal8rk
This is awesome! I can finally make that Bob-Omb Battlefield recreation I've always wanted to make!

Re: Tilt Cannons

Posted: Sat Aug 13, 2022 7:40 am
by Marioman2007
Amazing script!

Re: Tilt Cannons

Posted: Sat Aug 13, 2022 12:10 pm
by Emral
an optional visualization of the shoot arc would be awesome

Re: Tilt Cannons

Posted: Sat Aug 13, 2022 3:10 pm
by Master of Disaster
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!

Re: Tilt Cannons

Posted: Sun Aug 14, 2022 6:28 am
by Registered sand eater
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)

Re: Tilt Cannons

Posted: Sun Aug 14, 2022 8:36 am
by Master of Disaster
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

Re: Tilt Cannons

Posted: Sun Aug 14, 2022 1:36 pm
by AirShip
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.

Re: Tilt Cannons

Posted: Tue Aug 16, 2022 3:05 am
by Registered sand eater
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.

Re: Tilt Cannons

Posted: Mon Aug 29, 2022 8:43 am
by Wiimeiser
Now if only you could enter them via a clear pipe. That would be neat.

Re: Tilt Cannons

Posted: Mon Feb 20, 2023 5:58 am
by Master of Disaster
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

Re: Tilt Cannons

Posted: Thu May 23, 2024 5:21 pm
by lugiaTheAntarticLord
How do i fix the arrow indicators being slow?

Re: Tilt Cannons

Posted: Fri Sep 06, 2024 12:25 am
by yoshibro75
The arrow indicator and smoke particles are slow and delayed.

Re: Tilt Cannons

Posted: Mon Sep 09, 2024 5:30 am
by Master of Disaster
I've actually worked on an update for the Tiltcannons but stopped working at some point because I got fed up with how Peach's X speed is handled, when I return to work on it I'll probably rewrite quite a bit of code, including the arrow indicator to not have people waiting for it to orientate itself. With that it's a lot more helpful since you won't have to wait for eternities to see whether your shot lines up or not.