Spread
Last updated
Last updated
Spread lets you control the randomness in the direction after shooting. In general, you don't want bullets to fly perfectly straight, you want some random angle. Video Games all handle this differently, but in general, you should make your first shot fairly accurate, and increase spread over time.
Spread Accuracy. Spread is the opposite of accuracy. Lower spreads mean higher accuracy.
Spread images are .png
files in the your server -> plugins -> WeaponMechanics -> spread_patterns folder. You can use this feature along with other spread features to accurately replicate spread from video games.
Name
The name of the image file (For example, "circle.png"
).
Field_Of_View_Width
The "maximum angle" of the image.
If you set this to 45.0
, then the pixels on the edge of the image will be at a 45 degree angle.
Defaults to 45.0
.
Field_Of_View_Height
Same as Field_Of_View_Width
, but for the vertical angle instead.
If you create your image files, make sure to only use grayscale colors! It is recommended to keep image files smaller than 128x128, but there is no CPU impact on differently-sized images.
The randomness applied to all shots. Applied both vertically, and horizontally.
Modifies the amount of spread based on what the player is doing. For example, when the player is scoping, you probably want to reduce spread.
Zooming
-> when scoping with the weapon
Sneaking
-> When the player is holding shift
Standing
-> When the shooter is not moving
Walking
-> When the shooter is moving
Riding
-> When the shooter is riding an entity
Sprinting
-> When the player is sprinting
Dual_Wielding
-> When the shooter has weapons in both hands
Swimming
-> When the shooter is in water
In_Midair
-> When the shooter is in the air
Gliding
-> When the shooter is gliding using an elytra
For example:
Changes the spread after every consecutive shot. This can be used to make guns inaccurate if you spam.
Starting_Amount
The base change amount.
If you want the first shot to be accurate, use 0
.
Reset_Time
The time, in ticks, it takes to reset spread back to Starting_Amount
.
The timer resets after every shot.
Increase_Change_When
This works just like Modify_Spread_When
Always
-> Every shot
+ all options from Modify_Spread_When
Bounds
Defines the minimum and maximum spreads.
Reset_After_Reach_Bounds
Use true
to reset back to Starting_Amount
Use false
so the spread stays high for people spamming the gun.
Minimum
The lowest spread value allowed.
Maximum
The highest spread value allowed.