mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Updated sitting-framework, added unfinished note
This commit is contained in:
parent
3b74cc4f47
commit
1019450c30
@ -1,28 +1,27 @@
|
|||||||
---
|
---
|
||||||
layout: wiki
|
layout: wiki
|
||||||
title: Scopes framework
|
title: Scopes Framework
|
||||||
description:
|
description: Explains how to set-up scopes with ACE3 scope adjustment system.
|
||||||
group: framework
|
group: framework
|
||||||
order: 5
|
order: 5
|
||||||
parent: wiki
|
parent: wiki
|
||||||
---
|
---
|
||||||
|
|
||||||
## 1. Adding scope adjustement support
|
## 1. Adding scope adjustment support
|
||||||
|
|
||||||
```c++
|
```c++
|
||||||
class CfgWeapons {
|
class CfgWeapons {
|
||||||
class ItemCore;
|
class InventoryOpticsItem_Base_F; // ItemInfo base class
|
||||||
class InventoryOpticsItem_Base_F;
|
|
||||||
|
|
||||||
class yourHighPoweredScope : ItemCore {
|
class YourScope {
|
||||||
ACE_ScopeAdjust_Vertical[] = { -4, 30 }; // max vertical adjustement limits
|
ace_scopeAdjust_vertical[] = {-4, 30}; // Maxmimum vertical adjustment limits
|
||||||
ACE_ScopeAdjust_Horizontal[] = { -6, 6 }; // max horizontal adjustement limits
|
ace_scopeAdjust_horizontal[] = {-6, 6}; // Maximum horizontal adjustment limits
|
||||||
ACE_ScopeAdjust_VerticalIncrement = 0.1; // vertical incrementation
|
ace_scopeAdjust_verticalIncrement = 0.1; // Vertical increment
|
||||||
ACE_ScopeAdjust_HorizontalIncrement = 0.1; // horizontal incrementation
|
ace_scopeAdjust_horizontalIncrement = 0.1; // Horizontal increment
|
||||||
class ItemInfo : InventoryOpticsItem_Base_F {
|
class ItemInfo: InventoryOpticsItem_Base_F {
|
||||||
class OpticsModes {
|
class OpticsModes {
|
||||||
class Snip {
|
class Snip {
|
||||||
discreteDistance[] = { 100 };
|
discreteDistance[] = {100};
|
||||||
discreteDistanceInitIndex = 0;
|
discreteDistanceInitIndex = 0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,47 +1,26 @@
|
|||||||
---
|
---
|
||||||
layout: wiki
|
layout: wiki
|
||||||
title: Sitting framework
|
title: Sitting Framework
|
||||||
description:
|
description: Explains how to set-up sitting furniture with ACE3 sitting system.
|
||||||
group: framework
|
group: framework
|
||||||
order: 5
|
order: 5
|
||||||
parent: wiki
|
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++
|
```c++
|
||||||
class CfgVehicles {
|
class CfgVehicles {
|
||||||
|
class MyChair {
|
||||||
#define MACRO_SEAT_ACTION \ // better use a macro, nobody wants to type this two times or more, right ?
|
ace_sitting_canSit = 1; // Enable sitting (0-disabled, 1-enabled)
|
||||||
class ACE_Actions { \
|
ace_sitting_sitDirection = 180; // Initial sitting direction (in degrees)
|
||||||
class ACE_MainActions { \
|
ace_sitting_sitPosition[] = {0, -0.1, -0.45}; // Sitting position in model space
|
||||||
displayName = "$STR_ACE_Interaction_MainAction"; \
|
ace_sitting_sitRotation = 10; // Maximum rotation possible in degrees, left and right.
|
||||||
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.
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
- 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.
|
|
||||||
|
Loading…
Reference in New Issue
Block a user