34 RegisterNetSyncVariableInt(
"m_State");
39 super.OnStoreSave(ctx);
47 if ( !super.OnStoreLoad(ctx, version) )
51 if ( !ctx.
Read( state ) )
63 vector mins =
"-0.75 0.3 -0.01";
64 vector maxs =
"0.75 0.32 0.01";
79 if (!victim.GetAllowDamage())
87 victim.ProcessDirectDamage(
DamageType.CLOSE_COMBAT,
this,
"",
"TripWireHit",
"0 0 0", 1);
103 super.OnItemLocationChanged(old_owner, new_owner);
115 super.EEItemLocationChanged(oldLoc, newLoc);
140 super.EEHealthLevelChanged(oldLevel, newLevel, zone);
154 super.SetInactive(stop_timer);
163 if (attachment.IsLockedInSlot())
165 attachment.UnlockFromParent();
168 attachment.OnActivatedByItem(
this);
196 super.RefreshState();
206 super.SetupTrapPlayer( player, set_position );
212 super.StartDeactivate(player);
224 return super.CanReceiveAttachment( attachment, slotId );
233 return super.CanDisplayAttachmentSlot( slot_id );
238 super.EEItemAttached(item, slot_name);
245 super.EEItemDetached(item, slot_name);
257 super.EEKilled(killer);
284 if ( MemoryPointExists(
"invView2" ) )
287 GetInventory().GetCurrentInventoryLocation( il );
354 super.OnPlacementCancelled(player);
374 return "tripwire_deploy_SoundSet";
379 return "tripwiretrap_deploy_SoundSet";
408 if ( GetInventory().AttachmentCount() > 0)
410 ItemBase attachment =
ItemBase.Cast( GetInventory().GetAttachmentFromIndex(0) );
415 for (
int i = 1; i <= 3; i++)
417 HideSelection(
"s" + i +
"_charge");
421 string proxy_to_show =
string.Format(
"s%1_charge",
GetState() );
423 ShowSelection( proxy_to_show );
440 override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
446 super.GetDebugActions(outputList);
451 if (super.OnAction(action_id, player, ctx))
455 if (action_id ==
EActions.ACTIVATE_ENTITY)
459 else if (action_id ==
EActions.DEACTIVATE_ENTITY)
Param4< int, int, string, int > TSelectableActionInfoWithColor
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
override void EEHealthLevelChanged(int oldLevel, int newLevel, string zone)
override bool CanDisplayAttachmentSlot(int slot_id)
override bool CanReceiveAttachment(EntityAI attachment, int slotId)
void OnItemLocationChanged(ItemBase item)
PlaceObjectActionReciveData ActionReciveData ActionDeployObject()
void AddAction(typename actionName)
override void EEItemDetached(EntityAI item, string slot_name)
override void EEItemAttached(EntityAI item, string slot_name)
bool OnStoreLoad(ParamsReadContext ctx, int version)
void OnStoreSave(ParamsWriteContext ctx)
override void OnDebugSpawn()
DamageType
exposed from C++ (do not change)
override bool OnAction(int action_id, Man player, ParamsReadContext ctx)
override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
override void EEKilled(Object killer)
override void OnPlacementComplete(Man player, vector position="0 0 0", vector orientation="0 0 0")
override bool IsTakeable()
InventoryLocationType
types of Inventory Location
string GetLoopDeploySoundset()
override void SetTakeable(bool pState)
string GetDeploySoundset()
void OnInventoryEnter(Man player)
Event called on item when it is placed in the player(Man) inventory, passes the owner as a parameter.
enum EObjectTemperatureState m_State
override void EEItemLocationChanged(notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
void SetState(bool state)
bool m_ResultOfAdvancedPlacing
static const int TRIGGERED
enum eWireMaterial FOLDED
override int GetViewIndex()
static const int DEPLOYED
void SetWireType(int wireType)
override void OnPlacementCancelled(Man player)
vector m_TriggerOrientation
void UpdateProxySelections()
string m_AnimationPhaseTriggered
void DeferredEnableTrigger()
enum SoundTypeTrap SPAWN_FLAGS
string m_AnimationPhaseGrounded
void OnTriggeredByFall(Contact extra)
SERVER: decide what "triggered by falling" means for this trap.
void OnSteppedOn(EntityAI victim)
string m_InfoActivationTime
string m_AnimationPhaseSet
void SetInactive(bool stop_timer=true)
TrapTrigger m_TrapTrigger
void SetupTrapPlayer(PlayerBase player, bool set_position=true)
void StartActivate(PlayerBase player)
void OnTriggeredByFallEffectsClient()
CLIENT: one-shot visual/audio feedback for the fall-trigger, called via the BoolSignal sync.
void StartDeactivate(PlayerBase player)
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
Wrapper class for managing sound through SEffectManager.
proto native EntityAI GetAttachmentFromIndex(int index)
proto native int AttachmentCount()
Returns count of attachments attached to this item.
bool DropEntity(InventoryMode mode, EntityAI owner, notnull EntityAI item)
script counterpart to engine's class Inventory
proto native int GetType()
returns type of InventoryLocation
static EffectSound PlaySound(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.
Manager class for managing Effect (EffectParticle, EffectSound)
proto bool Write(void value_out)
proto bool Read(void value_in)
Keffiyeh_LightBlue SetActions
Serializer ParamsReadContext
Serializer ParamsWriteContext
const int SAT_DEBUG_ACTION
vector GetPosition()
Get the world position of the Effect.
proto native int GetState()
returns one of STATE_...