Updated sitting-framework, added unfinished note

This commit is contained in:
jonpas 2015-08-25 03:59:56 +02:00
parent 3b74cc4f47
commit 1019450c30
2 changed files with 24 additions and 46 deletions

View File

@ -1,28 +1,27 @@
---
layout: wiki
title: Scopes framework
description:
title: Scopes Framework
description: Explains how to set-up scopes with ACE3 scope adjustment system.
group: framework
order: 5
parent: wiki
---
## 1. Adding scope adjustement support
## 1. Adding scope adjustment support
```c++
class CfgWeapons {
class ItemCore;
class InventoryOpticsItem_Base_F;
class InventoryOpticsItem_Base_F; // ItemInfo base class
class yourHighPoweredScope : ItemCore {
ACE_ScopeAdjust_Vertical[] = { -4, 30 }; // max vertical adjustement limits
ACE_ScopeAdjust_Horizontal[] = { -6, 6 }; // max horizontal adjustement limits
ACE_ScopeAdjust_VerticalIncrement = 0.1; // vertical incrementation
ACE_ScopeAdjust_HorizontalIncrement = 0.1; // horizontal incrementation
class ItemInfo : InventoryOpticsItem_Base_F {
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 };
discreteDistance[] = {100};
discreteDistanceInitIndex = 0;
};
};

View File

@ -1,47 +1,26 @@
---
layout: wiki
title: Sitting framework
description:
title: Sitting Framework
description: Explains how to set-up sitting furniture with ACE3 sitting system.
group: framework
order: 5
parent: wiki
---
## 1. adding sitting support to a chair
## 1. Adding sitting support to a chair
<div class="panel callout">
<h5>Note:</h5>
<p>Unfinished! What you see below will not work in ACE 3.2.1</p>
</div>
```c++
class CfgVehicles {
#define MACRO_SEAT_ACTION \ // better use a macro, nobody wants to type this two times or more, right ?
class ACE_Actions { \
class ACE_MainActions { \
displayName = "$STR_ACE_Interaction_MainAction"; \
selection = ""; \
distance = 1.5; \
condition = "true"; \
class ACE_sitting_Sit { \
displayName = "$STR_ACE_Sitting_Sit"; \
condition = "_this call ace_sitting_fnc_canSit"; \
statement = "_this call ace_sitting_fnc_sit"; \
showDisabled = 0; \
priority = 0; \
icon = "z\ace\sitting\UI\sit_ca.paa"; \
}; \
}; \
};
class ThingX; // base class for objects
class yourChair: ThingX { // your chair class
XEH_ENABLED; // enable XEH on that object class
MACRO_SEAT_ACTION // add the interaction
ACE_sitting_canSit = 1; // enable sitting
ACE_sitting_sitDirection = 180; // sitting direction in degrees
ACE_sitting_sitPosition[] = {0, -0.1, -0.45}; // sitting position in a X Y Z plane
ACE_sitting_sitRotation = 10; // maximum rotation possible in degrees, left and right.
class MyChair {
ace_sitting_canSit = 1; // Enable sitting (0-disabled, 1-enabled)
ace_sitting_sitDirection = 180; // Initial sitting direction (in degrees)
ace_sitting_sitPosition[] = {0, -0.1, -0.45}; // Sitting position in model space
ace_sitting_sitRotation = 10; // Maximum rotation possible in degrees, left and right.
};
};
```
- No escape possible here, you'll have to fiddle with the position direction and rotation to have a normal pose.
- For the sitRotation 10 is use for chairs with arms, 45 for the ones without.