tModLoader Modding Tutorial 3: Some More Weapons

How can I make the projectiles release from the barrel of the gun instead of the player? Tried 'position + vector2(x,y)' but it likes adjusting the projectiles spawnpoint, not released correctly from the barrel when rotating the gun.
Check out ExampleGun.cs, it has an example of doing that. But from my experience, it still has the weird angle while pointing upwards. You could probably fix this by offseting the angle, and using Vector2.RotatedBy(radians, center) with rotation offset of player mouse angle/ proj velocity for the final result
 
Check out ExampleGun.cs, it has an example of doing that. But from my experience, it still has the weird angle while pointing upwards. You could probably fix this by offseting the angle, and using Vector2.RotatedBy(radians, center) with rotation offset of player mouse angle/ proj velocity for the final result
Thanks. And with 2 projectiles each shot is there a way to make 1 of 2 projectiles stop moving while the other is acting normally. I'm trying to create the muzzle burst for the gun.
 
Thanks. And with 2 projectiles each shot is there a way to make 1 of 2 projectiles stop moving while the other is acting normally. I'm trying to create the muzzle burst for the gun.
Wdym
 
This has helped a lot with my first mod, but I was wondering where I put
public override Vector2? HoldoutOffset() => new Vector2(-8f, 0f);
in the code. That's all.
 
This has helped a lot with my first mod, but I was wondering where I put
public override Vector2? HoldoutOffset() => new Vector2(-8f, 0f);
in the code. That's all.
Anywhere inside the class, but outside of other methods
 
okay so i tried to follow the gun tutorial but got stuck on how to make bullets and now my brain is fried so can i get some help with this since i just wanted to make a gun that had insane knockback and thats it
 
okay so i tried to follow the gun tutorial but got stuck on how to make bullets and now my brain is fried so can i get some help with this since i just wanted to make a gun that had insane knockback and thats it
Can you enter here the code that you tried to implement so that more accurate help can be given?
 
Back
Top Bottom