ACE3/documentation/framework/scopes-framework.md

32 lines
908 B
Markdown
Raw Normal View History

2015-08-23 22:43:31 +00:00
---
layout: wiki
title: Scopes Framework
description: Explains how to set-up scopes with ACE3 scope adjustment system.
2015-08-23 22:43:31 +00:00
group: framework
order: 5
parent: wiki
---
## 1. Adding scope adjustment support
2015-08-23 22:43:31 +00:00
```c++
class CfgWeapons {
class InventoryOpticsItem_Base_F; // ItemInfo base class
2015-08-23 22:43:31 +00:00
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 {
2015-08-23 22:43:31 +00:00
class OpticsModes {
class Snip {
discreteDistance[] = {100};
2015-08-23 22:43:31 +00:00
discreteDistanceInitIndex = 0;
};
};
};
};
};
```