mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
1df3a73461
* Update documentation guidelines * Add version info part 1 * Add version info part 2 * Add removed in version to frontmatter and tag testmissions as removed * Add version info part 3
37 lines
959 B
Markdown
37 lines
959 B
Markdown
---
|
|
layout: wiki
|
|
title: Scopes Framework
|
|
description: Explains how to set-up scopes with ACE3 scope adjustment system.
|
|
group: framework
|
|
order: 5
|
|
parent: wiki
|
|
mod: ace
|
|
version:
|
|
major: 3
|
|
minor: 0
|
|
patch: 0
|
|
---
|
|
|
|
## 1. Adding scope adjustment support
|
|
|
|
```cpp
|
|
class CfgWeapons {
|
|
class InventoryOpticsItem_Base_F; // ItemInfo base class
|
|
|
|
class YourScope {
|
|
ace_scopeAdjust_vertical[] = {-4, 30}; // Maxmimum vertical adjustment limits
|
|
ace_scopeAdjust_horizontal[] = {-6, 6}; // Maximum horizontal adjustment limits
|
|
ace_scopeAdjust_verticalIncrement = 0.1; // Vertical increment
|
|
ace_scopeAdjust_horizontalIncrement = 0.1; // Horizontal increment
|
|
class ItemInfo: InventoryOpticsItem_Base_F {
|
|
class OpticsModes {
|
|
class Snip {
|
|
discreteDistance[] = {100};
|
|
discreteDistanceInitIndex = 0;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
```
|