34 RegisterNetSyncVariableInt(
"m_State");
39 super.OnVariablesSynchronized();
49 super.OnStoreSave(ctx);
57 if ( !super.OnStoreLoad(ctx, version) )
61 if ( !ctx.
Read( state ) )
73 vector mins =
"-0.75 0.3 -0.01";
74 vector maxs =
"0.75 0.32 0.01";
87 if (!victim.GetAllowDamage())
95 victim.ProcessDirectDamage(DT_CLOSE_COMBAT,
this,
"",
"TripWireHit",
"0 0 0", 1);
109 super.OnItemLocationChanged(old_owner, new_owner);
121 super.EEItemLocationChanged(oldLoc, newLoc);
146 super.EEHealthLevelChanged(oldLevel, newLevel, zone);
160 super.SetInactive(stop_timer);
163 for (
int att = 0; att < GetInventory().AttachmentCount(); att++)
165 ItemBase attachment =
ItemBase.Cast(GetInventory().GetAttachmentFromIndex(att));
168 if (attachment.IsLockedInSlot())
170 attachment.UnlockFromParent();
173 attachment.OnActivatedByItem(
this);
174 GetInventory().DropEntity(
InventoryMode.SERVER,
this, attachment);
202 super.RefreshState();
212 super.SetupTrapPlayer( player, set_position );
218 super.StartDeactivate(player);
230 return super.CanReceiveAttachment( attachment, slotId );
239 return super.CanDisplayAttachmentSlot( slot_id );
244 super.EEItemAttached(item, slot_name);
251 super.EEItemDetached(item, slot_name);
263 super.EEKilled(killer);
287 #ifdef PLATFORM_WINDOWS
289 override int GetViewIndex()
291 if ( MemoryPointExists(
"invView2" ) )
294 GetInventory().GetCurrentInventoryLocation( il );
348 super.OnPlacementComplete(player, position, orientation);
363 super.OnPlacementCancelled(player);
383 return "tripwire_deploy_SoundSet";
388 return "tripwiretrap_deploy_SoundSet";
405 if ( GetInventory().AttachmentCount() > 0)
407 ItemBase attachment =
ItemBase.Cast( GetInventory().GetAttachmentFromIndex(0) );
412 for (
int i = 1; i <= 3; i++)
414 HideSelection(
"s" + i +
"_charge");
418 string proxy_to_show =
string.Format(
"s%1_charge",
GetState() );
420 ShowSelection( proxy_to_show );
437 override void GetDebugButtonNames(out
string button1, out
string button2, out
string button3, out
string button4)
439 button1 =
"Activate";
440 button2 =
"Deactivate";
445 switch (button_index)
PlaceObjectActionReciveData ActionReciveData ActionDeployObject()
void AddAction(typename actionName)
override void EEItemDetached(EntityAI item, string slot_name)
override void EEItemAttached(EntityAI item, string slot_name)
override void EEKilled(Object killer)
override bool IsTakeable()
override void OnDebugButtonPressServer(int button_index)
override void GetDebugButtonNames(out string button1, out string button2, out string button3, out string button4)
class Hatchback_02_Blue extends Hatchback_02 OnDebugSpawn
InventoryLocationType
types of Inventory Location
override void OnItemLocationChanged(EntityAI old_owner, EntityAI new_owner)
override void SetTakeable(bool pState)
void SetIsPlaceSound(bool is_place_sound)
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.
override bool CanReceiveAttachment(EntityAI attachment, int slotId)
override void OnVariablesSynchronized()
void OnStoreSave(ParamsWriteContext ctx)
bool OnStoreLoad(ParamsReadContext ctx, int version)
override void EEItemLocationChanged(notnull InventoryLocation oldLoc, notnull InventoryLocation newLoc)
void SetState(bool state)
protected float m_DrainThreshold protected bool m_State
static const int TRIGGERED
enum eWireMaterial FOLDED
protected vector m_TriggerOrientation
static const int DEPLOYED
private int m_WireMaterial
override bool CanDisplayAttachmentSlot(int slot_id)
void SetWireType(int wireType)
override void OnPlacementCancelled(Man player)
protected bool m_ResultOfAdvancedPlacing
protected vector m_TriggerPosition
void UpdateProxySelections()
string m_AnimationPhaseTriggered
enum SoundTypeTrap SPAWN_FLAGS
string m_AnimationPhaseGrounded
string m_InfoActivationTime
string m_AnimationPhaseSet
void SetInactive(bool stop_timer=true)
void SetupTrapPlayer(PlayerBase player, bool set_position=true)
void StartActivate(PlayerBase player)
void StartDeactivate(PlayerBase player)
protected TrapTrigger m_TrapTrigger
class JsonUndergroundAreaTriggerData GetPosition
Wrapper class for managing sound through SEffectManager.
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
proto native int GetType()
returns type of InventoryLocation
Manager class for managing Effect (EffectParticle, EffectSound)
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.
Serialization general interface. Serializer API works with:
proto bool Write(void value_out)
proto bool Read(void value_in)
override string GetLoopDeploySoundset()
override void EEHealthLevelChanged(int oldLevel, int newLevel, string zone)
override void OnPlacementComplete(Man player, vector position="0 0 0", vector orientation="0 0 0")
override void OnSteppedOn(EntityAI victim)
override bool IsDeployable()
override void SetActions()
override void CreateTrigger()
void SetParentObject(TrapBase obj)
void SetExtents(vector mins, vector maxs)
Set the size of the Trigger, avoid using SetCollisionBox directly.
proto native CGame GetGame()
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.
proto native int GetState()
returns one of STATE_...