11 override protected void Init()
15 if (
GetGame().GetMission().GetEffectWidgets())
22 override protected void RegisterBleedingZoneEx(
string name,
int max_time,
string bone =
"",
vector orientation =
"0 0 0",
vector offset =
"0 0 0",
float flow_modifier = 1,
string particle_name =
"BleedingSourceEffect",
int inv_location = 0)
24 super.RegisterBleedingZoneEx(
name,max_time,bone,orientation,offset,flow_modifier,particle_name,inv_location);
26 if (
GetGame().GetMission().GetEffectWidgets())
59 int bit = 1 << bit_offset;
72 super.AddBleedingSource(bit);
79 if (super.RemoveBleedingSource(bit))
90 for (
int i = 0; i < 32; i++)
92 int compare_bit = 1 << i;
93 int new_compare_result_bit = compare_bit & new_mask;
94 int old_compare_result_bit = compare_bit & old_mask;
96 if ( new_compare_result_bit )
98 if ( !(new_compare_result_bit & old_mask))
106 if ( new_compare_result_bit != old_compare_result_bit )
116 int bleeding_source_count = 0;
125 bleeding_source_count++;
129 return bleeding_source_count;
137 int boneIdx =
m_Player.GetBoneIndexByName(
"RightArmExtra");
152 eff.SetAutodestroy(
true);
158 m_Player.AddChild(linkedObject, boneIdx);
190 bool anyBleedingSourceActive =
false;
203 anyBleedingSourceActive =
true;
207 if (!anyBleedingSourceActive)
209 DbgUI.
Text(
"Currently no bleeding sources are active.");
250 for (
int i = 0; i < bsCount; ++i)
261 for (
int i = 0; i < bsCount; ++i)
void BleedingSourceEffect()
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
void OnVariablesSynchronized(int current_bits)
int GetBleedingSourceCountRemote()
void AddBleedingSource(int bit)
BleedingSourceZone GetBleedingSourceMeta(int bit)
string GetSelectionNameFromBit(int bit)
bool m_EnableHitIndication
ref map< int, ref BleedingSource > m_BleedingSources
void DisplayVisualDebug()
bool RemoveBleedingSource(int bit)
void RegisterBleedingZoneEx(string name, int max_time, string bone="", vector orientation="0 0 0", vector offset="0 0 0", float flow_modifier=1, string particle_name="BleedingSourceEffect", int inv_location=0)
ref map< string, ref BleedingSourceZone > m_BleedingSourceZone
void OnBleedingBitsUpdate(int old_mask, int new_mask)
proto native Object CreateObject(string type, vector pos, bool create_local=false, bool init_ai=false, bool create_physics=true)
Creates object of certain type.
proto native Mission GetMission()
Particle GetParticle()
Gets the main particle which this Effect is managing.
static proto native owned string GetSlotName(int id)
converts slot_id to string
provides access to slot configuration
GameplayEffectWidgets_base GetEffectWidgets()
Legacy way of using particles in the game.
static int PlayInWorld(notnull Effect eff, vector pos)
Play an Effect.
Manager class for managing Effect (EffectParticle, EffectSound)
proto native CGame GetGame()
static proto native void End()
static proto native void Begin(string windowTitle, float x=0, float y=0)
static proto native void Text(string label)
static proto void BeginCleanupScope()
static proto native void EndCleanupScope()
static proto float Pow(float v, float power)
Return power of v ^ power.