Garry's Mod

Garry's Mod

Prop Cannon Tool ( Improved )
93 Comments
[Sk$Bh]Trick or treat KID!  [author] 11 Mar, 2023 @ 8:27am 
Ramenya 10 Mar @ 12:43pm

Hey, you can enable the feature if you like. I've coded PD-control to align the bullet.

https://github.com/dvdvideo1234/PropCannonTool/pull/3
=♥Abby♥= 10 Mar, 2023 @ 2:43am 
Aight thanks!
[Sk$Bh]Trick or treat KID!  [author] 7 Mar, 2023 @ 1:40pm 
Ramenya 6 Mar @ 3:41pm

There is nothing wrong with it. The bullet velocity alignemnt is currently experimental. The problem comes form the server still running while the game is paused. Gmod uses the time ( kg * m^2 * degrees / s ) to calculate the applied torque according to the function wiki page:

https://wiki.facepunch.com/gmod/PhysObj:ApplyTorqueCenter

This messes with the output force in the next tick after the game is unfrozen

Please, enter the following in the console: "propcannon_bualgnvelcty 0" to disable the featutre
=♥Abby♥= 6 Mar, 2023 @ 5:41am 
Does not work
[Sk$Bh]Trick or treat KID!  [author] 3 Feb, 2023 @ 10:50pm 
@Mihacappy 7 hours ago

Sure thing buddy :P
Mihacappy 3 Feb, 2023 @ 3:34pm 
@[Sk$Bh]Trick or treat KID! yes
|Angry Virgin Gamer| Trade.TF 28 Dec, 2022 @ 9:57pm 
*insert war of the servers music here*
frogsåup 21 Aug, 2022 @ 12:54am 
ok
[Sk$Bh]Trick or treat KID!  [author] 20 Aug, 2022 @ 11:26am 
@frogsåup 19 Aug @ 8:53pm

You can use the convar "propcannon_maxfireforce" to define the fire force upper limit. The lower limit will always be zero. Curre tly the upper limit default value is 500k. Adjust it wo whatever you like and reload the control panel
frogsåup 19 Aug, 2022 @ 10:53am 
3x the current one would be good if thats possible
[Sk$Bh]Trick or treat KID!  [author] 19 Aug, 2022 @ 10:51am 
@frogsåup 1 hour ago

How much do you need it:? Keep in mind tat large forces might not work as expected or crash the game...
frogsåup 19 Aug, 2022 @ 9:00am 
the max force amount is weak
[Sk$Bh]Trick or treat KID!  [author] 2 May, 2022 @ 9:36am 
@Letha 22 hours ago

Implemented, though not every explosion effect supports scale
Letha 1 May, 2022 @ 11:28am 
Hey man, is there any possibility to make the explosion size, like the graphics bigger?
[Sk$Bh]Trick or treat KID!  [author] 7 Mar, 2022 @ 2:20am 
@RedLink1029 7 hours ago

There is no need to arm the bombs in prior. They are automatically armed here as long as you enable the cannon to fire explosives:
https://github.com/dvdvideo1234/PropCannonTool/blob/master/lua/entities/gmod_propcannon/init.lua#L289

When you do not enable the option the script will stick as close as to firing a ordinary phisics object.

Please delete your game workshop cache ( GarrysMod/garrysmod/cache ) and validate the game files
RedLink1029 5 Mar, 2022 @ 3:12pm 
I don't think that worked. I arm the bombs, then copy it using the prop cannon tool, then set prop cannon to fire the bomb i armed, and when I fire it, it bounces a few times (more depending on bomb. missiles dont explode unless shot at by a gun or other explosion) and then explodes, doesn't explode on contact :steamsad:
[Sk$Bh]Trick or treat KID!  [author] 3 Mar, 2022 @ 8:26am 
@RedLink1029 19 hours ago

Fixed. All bullets fired are now armed if arm method is available and the cannon is configured to fire explosives and Right-click copy cannon settings is available. Go nuts!!
[Sk$Bh]Trick or treat KID!  [author] 3 Mar, 2022 @ 1:14am 
To worries.

I was having the same problem with the armed bombs so I asked the author if somehow I can arm these right after I fire one. (E+RightClick) is designed to copy the entity class name ( like "prop_physics" for example ), so it is later used in "ents.Create" when actually making the bullet entity projectile. It does not copy the entire entity in a way you are thinking. For that we already have AdvDupe2 already and it is pointless to implement the same stuff here. If you need the exact cannon same everything, just right click to copy the trace settings and create a new cannon using the new settings. I can also copy the model via right click, but I found that changing the model and calling "bullet:SetModel(model)" on the selected bomb does not update the model as it is probably being hard-coded by the author in the source. I black listed some of the entity types that must be illegal for entity class selection ( like players, NPCs or widgets just like in TA )
RedLink1029 2 Mar, 2022 @ 12:44pm 
Just wanted to let you know what happens when it's used with entities like the bombs from gwarheads. And as an added thought, unless its a mod I know nothing of, when pressing E+Right Click it should copy the entity as it was, like the duplicator tool does, except instead of simply placing it down as an exact copy, it (or rather this cannon) fires it over a distance. Anywho, Love the mod. Keep up the good work :)

Sidenote: If this was also implemented, you would be a godsend! :steamthumbsup:
RedLink1029 2 Mar, 2022 @ 12:44pm 
It works as advertised, but the one thing I wish it did, was copy the state the entity was in (in this case, the bomb is armed and only needs to collide with something to explode) as it is atm, they come out unarmed and require several to be shot so that they can bounce into each other and explode. (the setting you have for "explodes on contact" doesnt work with the entities it, now, fires) The mod works wonders and provides MANY new options with this implementation and I do greatly appreciate the hard work you put into this.
[Sk$Bh]Trick or treat KID!  [author] 1 Mar, 2022 @ 11:44am 
@ RedLink1029 21 hours ago

Implemented... Go nuts ! You can E + Right click copy the trace entitly class and left click to update the prop cannon. This will force it to use different class than the default bullet when it executes the method for firing one single prop. That way you can fire every class you need. Should code it a class filter but have to check which class is ok and which is not. But it will be OK in general
[Sk$Bh]Trick or treat KID!  [author] 28 Feb, 2022 @ 8:38am 
@ RedLink1029 12 hours ago

May I have a link to the bombs addon you are using, so I can implement custom entity firing?
RedLink1029 27 Feb, 2022 @ 8:04pm 
I'm referring to mods like gbombs or gwarheads and using this to launch those armed bombs over long distances (using the physgun is only fun until you throw a bomb short and you die from it and the gravity gun only picks up small entities/objects and doesn't launch them very far to begin with). If this addon can't do this, can you or anyone else direct me in the right direction to where I could find an addon that does this? (Still a good mod tho, just not what I need) :steamthumbsup:
[Sk$Bh]Trick or treat KID!  [author] 19 Feb, 2022 @ 11:02pm 
@RedLink1029 12 hours ago

You can always chane the model to something else. Just use your artilery model and done. Do you need to shoot props different than "cannon_prop"
RedLink1029 19 Feb, 2022 @ 10:03am 
This addon is fun, just wish it could fire entities, having a cannon for mods that add artillery shells or bombs like gwarheads or hbombs offers would be extremely helpful in making my own artillery cannons.
[Sk$Bh]Trick or treat KID!  [author] 16 Sep, 2021 @ 6:01am 
@mishengineer 13 Sep @ 11:45pm

You do realize he is not the real Gabe right :P
Mihacappy 13 Sep, 2021 @ 1:45pm 
@Gabe Newell
Wait i've seen you 15 minutes ago LOL
Dante 5 Feb, 2021 @ 10:56am 
cool
[Sk$Bh]Trick or treat KID!  [author] 5 Feb, 2021 @ 10:49am 
@dalekcyberboy 17 hours ago

Yes. It does. The wire port values are taken with priority to the numpad, so if you turn it on by wire, you cannot turn it of with numpad.
Dante 4 Feb, 2021 @ 5:17pm 
does this work with wire mod
[Sk$Bh]Trick or treat KID!  [author] 19 Dec, 2020 @ 2:08pm 
@JAWLINE

Fixed in the last update. You can go ahead and try how it handles now.
[Sk$Bh]Trick or treat KID!  [author] 17 Dec, 2020 @ 1:31pm 
@JAWLINE 46 minutes ago

Just make a new issue in the repository. Github will allow you to attach images.

https://github.com/dvdvideo1234/PropCannonTool/issues
MK4 GOLF 17 Dec, 2020 @ 12:43pm 
yeah sure i took a few how can i send them to you?
[Sk$Bh]Trick or treat KID!  [author] 17 Dec, 2020 @ 6:31am 
@JAWLINE 15 hours ago

May I have a screenshot of how you weld it and to what ?
MK4 GOLF 16 Dec, 2020 @ 2:30pm 
every time i weld it to a surface the prop wont fire properly and it detonates right away. any suggestions why or how i can fix it?
Osaker 26 Jun, 2020 @ 6:27am 
great
[Sk$Bh]Trick or treat KID!  [author] 26 Jun, 2020 @ 4:32am 
@LMSFan11 8 hours ago

Sure yiu can. The prop cannon is just a scripted phyiscs entity lake any other 😊
Osaker 25 Jun, 2020 @ 7:52pm 
can you mount the cannon on entities props ragdolls animated props etc?
[Sk$Bh]Trick or treat KID!  [author] 26 May, 2020 @ 11:08am 
Wire controlled aim direction has been added.
[Sk$Bh]Trick or treat KID!  [author] 20 May, 2020 @ 11:57pm 
I am currently increasing cannon's wire inputs to override internals when connected
[Sk$Bh]Trick or treat KID!  [author] 19 May, 2020 @ 7:18am 
The bug where more projectiles are fired and caused the game to crash for some people is now fixed:

https://github.com/dvdvideo1234/PropCannonTool/commit/421a19b8fc2f06fa9dd8982b36f20d19103eda6d#r39283856
Alarm 17 Jan, 2020 @ 9:43am 
Prop Cannon Tool только выпустил появился взрыв игра вылетела урод я отписываюс
Ursula Tadpole 26 Feb, 2019 @ 3:26pm 
wow cool! thanks a whole bunch
[Sk$Bh]Trick or treat KID!  [author] 26 Feb, 2019 @ 12:28pm 
Just change the convar like so:
propcannon_ammo_model <The_name_of_your_new_model_here>
Ursula Tadpole 25 Feb, 2019 @ 10:27pm 
do you happen to know of any way to load in custom ammo? that would be extraordinarily helpful. thanks in advance! etc etc
[Sk$Bh]Trick or treat KID!  [author] 19 Feb, 2019 @ 1:46pm 
This happens very rearly.. Gotta look in to it when I have time to spare.
chimmy50 17 Feb, 2019 @ 6:20pm 
Every time I press the button (I set it to Numpad 0) to fire, the game freezes and crashes...
[Sk$Bh]Trick or treat KID!  [author] 6 Sep, 2017 @ 10:19pm 
Well it happens. In what case it is creating the error. What error does it output ?
Alarm 6 Sep, 2017 @ 3:34am 
Твой скажу аддон конфликтует урод Is creating script error console много взрывал игра вылет