79 RplComponent characterRplComp = RplComponent.Cast(
Replication.FindItem(placingCharacterRplId));
80 if (!characterRplComp)
84 if (!placingCharacter)
104 Physics physics = entity.GetPhysics();
105 if (physics && (physics.IsDynamic() || physics.IsKinematic()))
110 if (mainEntity && mainEntity != entity)
113 if (physics && physics.IsDynamic())
126 Physics physics = e.GetPhysics();
129 if (physics.GetInteractionLayer() & EPhysicsLayerDefs.Water)
154 computedTransform =
m_vMat;
190 SCR_SoundDataComponent soundData;
194 soundData = SCR_SoundDataComponent.Cast(
GetOwner().FindComponent(SCR_SoundDataComponent));
201 param.End = param.Start - up;
214 soundComp.SoundEvent(overrideSoundEvent);
223 SCR_AudioSourceConfiguration audioSourceConfiguration = soundData.GetAudioSourceConfiguration(overrideSoundEvent);
224 if (!audioSourceConfiguration)
231 audioSource.SetSignalValue(
SCR_AudioSource.SURFACE_SIGNAL_NAME, material.GetSoundInfo().GetSignalValue());
234 soundManager.PlayAudioSource(audioSource);
256 if (newParentRplId.IsValid())
273 RplComponent characterRplComp = RplComponent.Cast(
Replication.FindItem(placingCharacterRplId));
274 if (!characterRplComp)
278 if (!placingCharacter)
325 if (newParentRplComp)
326 m_Parent = newParentRplComp.GetEntity();
336 RplComponent rplComp = RplComponent.Cast(item.
FindComponent(RplComponent));
337 if (rplComp && newParentRplComp && rplComp.IsOwner())
339 RplNode explosiveCharge = rplComp.GetNode();
340 RplNode newParent = newParentRplComp.GetNode();
342 explosiveCharge.SetParent(newParent);
350 if (parentDamageManager)
395 array<IEntity> excludeArray = {
m_Parent};
404 if (parentDamageManager)
448 if (parentDamageManager)
void SCR_AudioSource(SCR_AudioSourceConfiguration audioSourceConfiguration, vector mat[4])
bool IsLocked(IEntity user, BaseCompartmentSlot compartmentSlot)
enum SCR_ECompassType EntityEditorProps(category:"GameScripted/Gadgets", description:"Compass", color:"0 0 255 255")
Prefab data class for compass component.
func ScriptInvokerItemPlacedMethod
ScriptInvokerBase< ScriptInvokerItemPlacedMethod > ScriptInvokerItemPlaced
proto external Managed FindComponent(typename typeName)
proto external void SetAngles(vector angles)
Same as SetYawPitchRoll(), but sets rotation around X, Y and Z axis.
proto external vector GetAngles()
Same as GetYawPitchRoll(), but returns rotation vector around X, Y and Z axis.
proto external Physics GetPhysics()
proto external void GetWorldTransform(out vector mat[])
See IEntity::GetTransform.
proto external int Update()
proto external BaseWorld GetWorld()
proto external bool SetWorldTransform(vector mat[4])
See IEntity::SetTransform. Returns false, if there is no change in transformation.
proto external bool IsDeleted()
proto external IEntity GetRootParent()
Replication item identifier.
Script entry for garbage system modding.
static SCR_GarbageSystem GetByEntityWorld(IEntity entity)
ScriptInvoker GetOnDamageStateChanged(bool createNew=true)
void PlaceItemWithParentChange(RplId newParentRplId, int nodeId=-1)
Same as PlaceItem but with params that allow attaching the object to new parent entity.
void RPC_DoPlaceItem(RplId placingCharacterRplId)
void StartWatchingParentSlots()
Callback method triggered when item will finish its transfer to new parent when it is being attached ...
override void OnDelete(IEntity owner)
void SetPlacementPosition(vector right, vector up, vector forward, vector position, RplId characterRplId)
Authority method used to change the position at which item will placed when removed from the inventor...
override bool OverridePlacementTransform(IEntity caller, out vector computedTransform[4])
void PlacementDone(notnull ChimeraCharacter user)
override void OnPostInit(IEntity owner)
bool ValidateEntity(notnull IEntity entity)
void RPC_DoPlaceItemWithParentChange(RplId newParentRplId, int nodeId, RplId placingCharacterRplId)
static ScriptInvokerItemPlaced GetOnPlacementDoneInvoker()
void DetachFromParent()
Removes this entity from its parent hierarchy and places it on the ground.
void OnParentDamageStateChanged(SCR_HitZone hitZone)
void AttachToNewParentWhenUnlocked(bool nowLocked)
bool FilterCallback(notnull IEntity e)
void StopWatchingParentSlots()
Callback method when item is being transfered (f.e. picked up) after it was attached to some object.
void PlayPlacedSound(vector up, vector position, string overrideSoundEvent=SCR_SoundEvent.SOUND_PLACE_OBJECT)
void AttachToNewParent()
Method that will try to find new parent entity and make this entity a child of it.
void SetNewParent(RplId parentId=RplId.Invalid(), int nodeId=-1)
RplId m_PlacingCharacterRplId
static ref ScriptInvokerItemPlaced s_OnPlacementDoneInvoker
proto external void SetSignalValueStr(string signal, float value)
EPhysicsLayerPresets
Enum is filled by C++ by data in project config PhysicsSettings.LayerPresets.
IEntity GetOwner()
Owner entity of the fuel tank.
void RplRpc(RplChannel channel, RplRcver rcver, RplCondition condition=RplCondition.None, string customConditionName="")
RplChannel
Communication channel. Reliable is guaranteed to be delivered. Unreliable not.