tModLoader How to make it so every third bullet always crits

Ahndrek Li'Cyri

Skeletron Prime
Hello there!
I am trying to work this out, but i don't seem to be able to.
I have a gun that fires three bullets like the Clockwork Assault rifle does, however i wanted to make it so that every third bullet in the burst always does a critical hit.
I found the function GetWeaponCrit and I assume it has something to do with that, but I do not know exactly how to go about implementing how to make sure it's the third bullet in the burst.
Any help would be appreciated, thank you!
 

Michaelsoftman

Terrarian
Just thinking about it, depending on how you have set up your Shoot override method, can't you just have a counter for the # of projectiles being shot, and on the 3rd one, set item.crit to 100? And then set it back to whatever the default is for the other 2 shots.
 

Ahndrek Li'Cyri

Skeletron Prime
Just thinking about it, depending on how you have set up your Shoot override method, can't you just have a counter for the # of projectiles being shot, and on the 3rd one, set item.crit to 100? And then set it back to whatever the default is for the other 2 shots.
That could work, i'll give it a shot to see if it does.
 
Top Bottom