Aiming
Aiming is a feature that goes inside the features code block.
It would look like this:
"features": [
{
"type": "Aiming"
}
]What does it do?
By default, the gun can always already aim, so for a basic gun you don’t need this feature. However for guns that accept attachments, you may want this feature.
If you have a scope on a gun, it makes sense that you shouldn’t be able to use the iron sights. This means you need the iron sight aiming to be conditional. By default, it doesn’t do this, so this feature allows you to control it.
Here’s a complete example:
{
"type": "Aiming",
"zoom": 0.3,
"condition": {
"doesNotHaveAttachmentGroup": "ar_sightsandscopes"
}
}It’s easy to read.
"zoom" controls how far the gun zooms when aiming. Here, it’s set to 0.3.
And of course, "condition". Here, it’s set to "doesNotHaveAttachmentGroup": "ar_sightsandscopes".
Meaning, if the gun doesn’t have any attachment from attachment group "ar_sightsandscopes" then the aiming will enable. Obviously, if it does have an attachment from this group, then the aiming will disable.