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);
101 super.OnItemLocationChanged(old_owner, new_owner);
113 super.EEItemLocationChanged(oldLoc, newLoc);
138 super.EEHealthLevelChanged(oldLevel, newLevel, zone);
152 super.SetInactive(stop_timer);
161 if (attachment.IsLockedInSlot())
163 attachment.UnlockFromParent();
166 attachment.OnActivatedByItem(
this);
195 super.RefreshState();
205 super.SetupTrapPlayer( player, set_position );
211 super.StartDeactivate(player);
223 return super.CanReceiveAttachment( attachment, slotId );
232 return super.CanDisplayAttachmentSlot( slot_id );
237 super.EEItemAttached(item, slot_name);
244 super.EEItemDetached(item, slot_name);
256 super.EEKilled(killer);
280 #ifdef PLATFORM_WINDOWS
282 override int GetViewIndex()
284 if ( MemoryPointExists(
"invView2" ) )
286 InventoryLocation il =
new InventoryLocation;
287 GetInventory().GetCurrentInventoryLocation( il );
350 super.OnPlacementComplete(player, position, orientation);
355 super.OnPlacementCancelled(player);
375 return "tripwire_deploy_SoundSet";
380 return "tripwiretrap_deploy_SoundSet";
397 if ( GetInventory().AttachmentCount() > 0)
399 ItemBase attachment =
ItemBase.Cast( GetInventory().GetAttachmentFromIndex(0) );
404 for (
int i = 1; i <= 3; i++)
406 HideSelection(
"s" + i +
"_charge");
410 string proxy_to_show =
string.Format(
"s%1_charge",
GetState() );
412 ShowSelection( proxy_to_show );
429 override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
435 super.GetDebugActions(outputList);
440 if (super.OnAction(action_id, player, ctx))
444 if (action_id ==
EActions.ACTIVATE_ENTITY)
448 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.
PlaceObjectActionReciveData ActionReciveData ActionDeployObject()
void AddAction(typename actionName)
override void EEItemDetached(EntityAI item, string slot_name)
override void EEItemAttached(EntityAI item, string slot_name)
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()
class Hatchback_02_Blue extends Hatchback_02 OnDebugSpawn
InventoryLocationType
types of Inventory Location
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 void SetTakeable(bool pState)
string GetLoopDeploySoundset()
override void OnItemLocationChanged(EntityAI old_owner, EntityAI new_owner)
override bool CanReceiveAttachment(EntityAI attachment, int slotId)
override void EEHealthLevelChanged(int oldLevel, int newLevel, string zone)
void OnStoreSave(ParamsWriteContext ctx)
bool OnStoreLoad(ParamsReadContext ctx, int version)
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
static const int DEPLOYED
override bool CanDisplayAttachmentSlot(int slot_id)
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 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 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)
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_...