tModLoader Don't know why the Shoot method is wrong

Luciousiam

Terrarian
Wanting to add spread to this and can't for the life of me figure out why this shoot method is incorrect. Any help would be much appreciated.
 

Attachments

  • image_2024-02-03_021116752.png
    image_2024-02-03_021116752.png
    36.3 KB · Views: 25
  • image_2024-02-03_021233366.png
    image_2024-02-03_021233366.png
    119.1 KB · Views: 23
You’re following an outdated tutorial. Shoot is no longer used to change parameters for shooting, ModifyShootStats is. You can find an up-to-date example of a gun here: tModLoader/ExampleMod/Content/Items/Weapons/ExampleGun.cs at 1.4.4 · tModLoader/tModLoader
Additionally, if you Visual Studio set up correctly, it should be able to auto-complete method signatures for you. Just type override shoot in your class and VS should give you a list of every method you can override that contains the word “shoot”.
 
Yes, just use autocomplete for overrides. But you'll have to guess what they're named sometimes. Also VS gives EVERY override for ModItem if you type ``public override void/bool?/bool/int`` and so on.
 
Back
Top Bottom