22 if (!target || !target.GetObject() || player.GetCommand_Ladder() || player.GetCommand_Fall() )
40 string compName = building.GetActionComponentName( target.GetComponentIndex() );
50 string condCompName =
string.Format(
"%1_con", compName);
51 vector pos = player.GetPosition();
54 vector ladderEnterPointGlobal;
55 vector ladderDirPointGlobal;
56 float minDistanceSq = 100.0;
58 string dirCompName =
string.Format(
"%1_con_dir", compName);
60 for (
int i = 0; i < memSelection.Count(); i++ )
62 if ( memSelection[i].
GetName() == condCompName )
65 for(
int j = 0; j < memSelection[i].GetVertexCount(); j++ )
67 ladderEnterPointGlobal = building.ModelToWorld( memSelection[i].GetVertexPosition(lod, j) );
80 for (
int k = 0; k < memSelection.Count(); k++)
82 if( memSelection[k].
GetName() == dirCompName )
84 for(
int l = 0; l < memSelection[k].GetVertexCount(); l++ )
86 vector dirPoint = building.ModelToWorld( memSelection[k].GetVertexPosition(lod, l) );
88 if( dst < minDistanceSq)
91 ladderDirPointGlobal = dirPoint;
99 pos = pos - ladderEnterPointGlobal;
100 ladderDirPointGlobal = ladderDirPointGlobal - ladderEnterPointGlobal;
104 if ( angle < 90 || angle > 270)
115 super.Start( action_data );
121 string compName = b.GetActionComponentName( action_data.
m_Target.GetComponentIndex() );
125 string ladderType =
"metal";
136 action_data.
m_Player.SetClimbingLadderType(ladderType);
137 action_data.
m_Player.StartCommand_Ladder(b, ladderIndex );
ref CCIBase m_ConditionItem
ref CCTBase m_ConditionTarget
protected int m_StanceMask
class ActionTargets ActionTarget
ref ActionTarget m_Target
override bool IsInstant()
private const string GEOM_LOD_NAME
override void Start(ActionData action_data)
override void CreateConditionComponents()
private const string MEM_LOD_NAME
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override bool UseAcknowledgment()
override bool CanBeUsedSwimming()
Super root of all classes in Enforce script.
proto static native int DebugGetLadderIndex(string pComponentName)
proto static native bool DebugDrawLadder(Building pBuilding, int pLadderIndex)
debug draws any ladder
proto native owned string GetPropertyValue(int index)
static const string NAME_MEMORY
proto native int GetPropertyCount()
static const string NAME_GEOMETRY
proto native bool GetSelections(notnull out array< Selection > selections)
proto native owned string GetPropertyName(int index)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.
proto vector VectorToAngles()
Converts vector to spherical coordinates with radius = 1.
DayZPlayerConstants
defined in C++
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
static proto float AbsFloat(float f)
Returns absolute value.
proto string Substring(int start, int len)
Substring of 'str' from 'start' position 'len' number of characters.
proto native int Length()
Returns length of string.