Page 1 of 1

Tilt Cannons

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

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 Enjl
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.