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);
155 for (
int att = 0; att < GetInventory().AttachmentCount(); att++)
157 ItemBase attachment =
ItemBase.Cast(GetInventory().GetAttachmentFromIndex(att));
160 if (attachment.IsLockedInSlot())
162 attachment.UnlockFromParent();
165 attachment.OnActivatedByItem(
this);
166 GetInventory().DropEntity(
InventoryMode.SERVER,
this, attachment);
194 super.RefreshState();
204 super.SetupTrapPlayer( player, set_position );
210 super.StartDeactivate(player);
222 return super.CanReceiveAttachment( attachment, slotId );
231 return super.CanDisplayAttachmentSlot( slot_id );
236 super.EEItemAttached(item, slot_name);
243 super.EEItemDetached(item, slot_name);
255 super.EEKilled(killer);
279 #ifdef PLATFORM_WINDOWS
281 override int GetViewIndex()
283 if ( MemoryPointExists(
"invView2" ) )
285 InventoryLocation il =
new InventoryLocation;
286 GetInventory().GetCurrentInventoryLocation( il );
349 super.OnPlacementComplete(player, position, orientation);
354 super.OnPlacementCancelled(player);
374 return "tripwire_deploy_SoundSet";
379 return "tripwiretrap_deploy_SoundSet";
396 if ( GetInventory().AttachmentCount() > 0)
398 ItemBase attachment =
ItemBase.Cast( GetInventory().GetAttachmentFromIndex(0) );
403 for (
int i = 1; i <= 3; i++)
405 HideSelection(
"s" + i +
"_charge");
409 string proxy_to_show =
string.Format(
"s%1_charge",
GetState() );
411 ShowSelection( proxy_to_show );
428 override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
434 super.GetDebugActions(outputList);
439 if (super.OnAction(action_id, player, ctx))
443 if (action_id ==
EActions.ACTIVATE_ENTITY)
447 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 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
override bool OnAction(int action_id, Man player, ParamsReadContext ctx)
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 GetDebugActions(out TSelectableActionInfoArrayEx outputList)
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 ScriptCallQueue GetCallQueue(int call_category)
override void SetAutodestroy(bool auto_destroy)
Sets whether Effect automatically cleans up when it stops.
Wrapper class for managing sound through SEffectManager.
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 void Call(func fn, 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)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
proto bool Write(void value_out)
proto bool Read(void value_in)
Serializer ParamsReadContext
proto native CGame GetGame()
Serializer ParamsWriteContext
const int SAT_DEBUG_ACTION
class JsonUndergroundAreaTriggerData GetPosition
proto native int GetState()
returns one of STATE_...