DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ PlayOnObject()

static int SEffectManager::PlayOnObject ( notnull Effect eff,
Object obj,
vector local_pos = "0 0 0",
vector local_ori = "0 0 0",
bool force_rotation_relative_to_world = false )
inlinestaticprotected

Play an Effect.

Предупреждения
Read PlayInWorld warning
Аргументы
effEffect The Effect to play
objObject The parent of the Effect
local_posvector The local position to play the Effect in relation to the parent (Optional)
local_orivector The local orientation to play the Effect in relation to the parent (Optional)
force_rotation_relative_to_worldbool Whether to force the orientation to stay in WS (Optional)
Возвращает
int The registered ID of the Effect

См. определение в файле EffectManager.c строка 70

71 {
72 // Stop the effect first, just in case
73 eff.Stop();
74
75 int id = EffectRegister(eff);
76
77 if (!obj)
78 {
79 ErrorEx("Parent object is null.", ErrorExSeverity.WARNING);
80 eff.SetPosition(local_pos);
81 }
82 else
83 {
84 eff.SetPosition(obj.GetPosition());
85 }
86
87 eff.SetParent(obj);
88 eff.SetLocalPosition(local_pos);
89 eff.SetAttachedLocalOri(local_ori);
90
91 if (force_rotation_relative_to_world)
92 {
93 EffectParticle eff_particle = EffectParticle.Cast(eff);
94
95 if (eff_particle)
96 {
97 eff_particle.ForceParticleRotationRelativeToWorld(force_rotation_relative_to_world);
98 }
99 }
100
101 eff.Start();
102
103 return id;
104 }
void ForceParticleRotationRelativeToWorld(bool state)
Set orientation setting to be used by the effect when the Effect starts.
Определения EffectParticle.c:503
static int EffectRegister(Effect effect)
Registers Effect in SEffectManager.
Определения EffectManager.c:322
ErrorExSeverity
Определения EnDebug.c:62
enum ShapeType ErrorEx

Перекрестные ссылки Effect(), EffectRegister(), ErrorEx и EffectParticle::ForceParticleRotationRelativeToWorld().

Используется в CreateCarDestroyedEffect(), EOnPostSimulate(), ManBase::SetDecayEffects() и ItemBase::StartLoopSound().