Warhorse ScripBind documentation
ContentsIndexHome
PreviousUpNext
C_ScriptBindActor Methods

The methods of the C_ScriptBindActor class are listed here.

 
Name 
Description 
 
 
 
This is GetActorId, a member of class C_ScriptBindActor. 
 
 
 
When given entity is in chat, returns Main chat NPC of this chat
 
 
Name 
Description 
 
Syntax: Actor.AcceptChatRequest()
Accepts chat request from this actor.
 
 
Syntax: actor:AddBlood(1, 'head')
Adds blood on all equipped items and body in given body part (or all body parts).
 
 
Syntax: actor:AddDirt(1)
Adds dirt on all equipped items.
 
 
Syntax: actor.AddFrost( float frost )
Adds the specified frost amount.
 
 
 
 
Syntax: Actor.AttachVulnerabilityEffect( int characterSlot, int partid, Vec3 hitPos, float radius, const char* effect, const char* attachmentIdentifier)
Attaches vulnerability effect.
 
 
Syntax: Actor.CameraShake( float amount,float duration,float frequency,Vec3 pos )
Applies a shake movement to the camera. 
 
Syntax: Actor.CanBeButchered()
Returns true if actor can be butchered (Must be animal and not yet butchered) See also IsPlayerInButcheringDistance
 
 
Syntax: Actor.CanChat()
Checks if chat can be started with this actor.
 
 
Syntax: Actor.CanDoMercyKill(EntityId victimEntityId)
Find out if we actor is allowed to kill another from mercy 
 
Syntax: Actor.CanFollow(npcEntity)
Checks if this NPC can be followed be player.
 
 
Syntax: Actor.CanGrabCorpse(EntityId victimEntityId)
Returns true if actor can grab vitimEntintyId 
 
Syntax: Actor.CanHorsePullDown(EntityId victimEntityId)
Find out if we actor is allowed to pull down another actor from horse 
 
Syntax: Actor.CanHuntAttack(EntityId victimEntityId)
Find out if we actor is allowed to hunt attack from run 
 
Syntax: Actor.CanInteractWith()
Checks if entity is close enough to interact with another one. Distance is defined by wh_player_TalkInteractorDistance
 
 
Syntax: Actor.CanLoot(EntityId victimEntityId)
Returns true if actor can loot vitimEntintyId 
 
Syntax: Actor.CanPutCorpse()
Returns true if actor is carrying a corpse and can put it back to the ground
 
 
Combat stealth actions ============================================= Syntax: Actor.CanStealthKill(EntityId victimEntityId)
Find out if we actor is allowed to kill given entity by stealth kill 
 
Syntax: Actor.CanStealthKnockout(EntityId victimEntityId)
Find out if we actor is allowed to knockout given entity by stealth 
 
Syntax: Actor.CanTalk()
Checks if this human have something to say. 
 
Syntax: Actor.CheckInventoryRestrictions( const char *itemClassName )
Checks if there is any restriction in the inventory for the specific item class.
 
 
Syntax: Actor.CheckVirtualInventoryRestrictions( SmartScriptTable inventory, const char *itemClassName )
Checks if there is any restriction in the virtual inventory for the specific item class.
 
 
Syntax: actor:CleanDirt(1)
Use only when you want to clean somebody programmatically. If you want to clean player after its in-game action, call WashDirtAndBlood instead. 
 
 
 
 
 
Syntax: Actor.CreateCodeEvent( SmartScriptTable params )
Creates a code event.
 
 
Syntax: Actor.DoChat()
Start chat with the player.
 
 
Syntax: Actor.DumpActorInfo()
Dumps actor info in the log file.
 
 
Syntax: Actor.EnableAspect( const char *aspect, bool enable )
Enables/Disables the specified aspect.
 
 
Clothing ============================================= Syntax: Actor.EquipClothingPreset( "46ea38bb-0be7-ca10-a8ac-d526056c04b3" )
Clothing preset is equipped to actor. Dirt level of actor is used for new items. Health of equipment slots is ignored. 
 
Syntax: Actor.EquipInventoryItem( ScriptHandle itemId )
Equips item from inventory
 
 
Weapon preset ============================================= Syntax: Actor.EquipWeaponPreset( "46ea38bb-0be7-ca10-a8ac-d526056c04b3" )
Weapon preset is equipped to actor. Health of equipment slots is ignored.
 
 
Fall 
Syntax: Actor.Fall( Vec3 hitPos )
Makes the actor falling down.
 
 
Syntax: Actor.GetAngles()
Gets the rotation angle of the actor. 
 
Syntax: Actor.GetArmor()
Gets the amount of armor.
 
 
Syntax: Actor.GetChannel()
Gets network channel.
 
 
Syntax: Actor.GetCloseColliderParts( int characterSlot, Vec3 hitPos, float radius )
Gets the closer collider parts.
 
 
Syntax: Actor.GetClosestAttachment( int characterSlot, Vec3 testPos, float maxDistance, const char* suffix )
Gets the closest attachment to the specified position within the specified distance. 
 
Syntax: Actor.GetCurrentAnimationState()
Gets the state for the current animation.
 
 
Syntax: Actor.GetExtensionParams( const char *extension, SmartScriptTable params )
Gets the parameters for the specified extension.
 
 
Syntax: actor.GetFrozenAmount()
Gets the frozen amount.
 
 
Syntax: Actor.GetHeadDir()
Gets the the actor's head direction.
has to be changed! (maybe bone position) 
 
Syntax: Actor.GetHeadPos()
Gets the actor's head position.
has to be changed! (maybe bone position) 
 
Syntax: Actor.GetHealth()
Gets the amount of health. NOTE: call soul.GetHealth()
 
 
Syntax: Actor.GetInitialClothingPreset()
Returns string - GUID of initial clothing preset
 
 
Syntax: Actor.GetInitialWeaponPreset()
Returns string - GUID of initial weapon preset 
 
Syntax: Actor.GetLinkedEntity()
Returns entity which is this actor linked to.
 
 
Syntax: Actor.GetMaxArmor()
Gets the maximum amount of armor.
 
 
Syntax: Actor.GetMaxHealth()
Gets the maximum amount of health.
 
 
Syntax: Actor.GetPhysicalizationProfile()
Gets the physicalization profile.
 
 
Syntax: Actor.GetSpectatorMode()
Gets the current spectator mode.
 
 
Syntax: Actor.HasAcceptedChat()
Checks if this actor has accepted chat.
 
 
Syntax: Actor.HasChatRequest()
Checks if this actor requested a chat with the player.
 
 
Syntax: actor:IsBodyMoreDirty(0.2)
Returns true if body is more dirty than dirtLevel
 
 
Syntax: Actor.IsCarryingCorpse()
Checks if this human is carrying a corpse.
 
 
 
 
Syntax: Actor.IsFlying()
Checks if the actor is flying.
 
 
Syntax: Actor.IsFollowing(npcEntity)
Checks if player is currently following the specified NPC.
 
 
Syntax: Actor.IsGhostPit()
Checks if the actor in the vehicle is hidden.
 
 
Syntax: Actor.IsLocalClient()
Checks if the script is runnin on a local client.
 
 
Syntax: actor:IsMoreDirty(0.2)
Returns true if any equipped item has more dirt status than the dirtLevel argument.
 
 
Syntax: Actor.IsPlayer()
Checks if the actor is the player.
 
 
Syntax: Actor.IsPlayerInButcheringDistance()
Returns true if actor is withing butchering distance Does not check other butchering conditions - use in conjunction with CanBeButchered
 
 
Syntax: Actor.IsUnconscious()
Returns true if the actor is unconscious.
 
 
Syntax: Actor.IsWaitingForDialogueReply()
Checks if actor is waiting for player to reply in a dialogue.
 
 
Syntax: Actor.LinkToEntity()
Links the Actor to an entity.
 
 
Syntax: Actor.MakeLookAsActor(sourceEntityId, bInHand)
Actor will look as another existing actor
 
 
Syntax: Actor.MakeLookAsActor(sourceSoulGuid)
Actor will look as another actor according to initial values in soul table. The source actor needs not be in scene.
 
 
Syntax: Actor.OpenChat()
Continue chat with the player.
 
 
Syntax: Actor:OpenItemMultiselectionFilter(entityId, filter)
Opens UI for selecting multiple items with multiple amounts.
 
 
Syntax: Actor:OpenItemSelectionFilter(entityId, filter)
Opens UI for selecting single item.
 
 
Syntax: Actor:OpenItemSelectionSharpening(entityId)
Returns more human readable representation of wuid. 
 
Syntax: Actor:OpenItemTransferStore(otherInventoryId)
 
 
 
 
Syntax: Actor.PostPhysicalize()
Forces the physical proxy to be rebuilt.
 
 
Syntax: Actor.RagDollize()
Activates the ragdoll death animations for the Actor.
 
 
Syntax: Actor.RenderScore( ScriptHandle player, int kills, int deaths, int ping )
Renders the score to the HUD.
 
 
Syntax: Actor.RequestDialog(entity, roles, bOnce)
Requests dialog with this human. roles - meta roles override for source soul Dialog does not start immediately but it only notifies targeted entity that somebody wants to interact with it. If target entity does not respond in proper time the request is canceled automatically. Returns true in case request was successfully accepted by dialog manager. In some cases it can return false which means that dialog was refused. 
 
Syntax: Actor.RequestGrabCorpse(EntityId victimEntityId)
Start grabbing target entity 
 
Syntax: Actor.RequestHorsePullDown(EntityId victimEntityId)
Request to pull down from horse 
 
Syntax: Actor.RequestHuntAttack(EntityId victimEntityId)
Request to hunt attack from run 
 
Syntax: Actor.RequestItemExchange(entity)
Requests inventory item exchange from this actor, loot in case actor is dead.
 
 
Syntax: Actor.RequestKnockOut(EntityId victimEntityId)
Request to knock out given entity 
 
Syntax: Actor.RequestMercyKill(EntityId victimEntityId)
Request to mercy kill on dying entity 
 
Syntax: Actor.RequesPutCorpse()
Start putting corpse to the ground
 
 
Syntax: Actor.RequestStealthKill(EntityId victimEntityId)
Request to kill given entity by stealth kill 
 
Syntax: Actor.ResetScores()
Resets scores.
 
 
Syntax: Actor.ResetVulnerabilityEffects( int characterSlot )
Resets the vulnerability effects.
 
 
Syntax: actor.Revive()
Revives the Actor.
 
 
Syntax: Actor.SetAngles( Ang3 vAngles )
Sets the rotation angle for the actor.
TOFIX:rendundant with CScriptBindEntity::SetAngles 
 
Syntax: Actor.SetDialogAnimationState(true)
Turns automatic dialog animation on and off
 
 
Syntax: Actor.SetExtensionActivation( const char *extension, bool activation )
 
 
Syntax: Actor.SetExtensionParams( const char *extension, SmartScriptTable params )
Sets some parameters to the specified extension.
 
 
 
 
 
 
Syntax: Actor.SetHealth( float health )
OBSOLETE: use soul script bind
 
 
Syntax: Actor.SetLookIK(true)
Enable/disable look IK for this actor
 
 
Syntax: Actor.SetMaxHealth( float health )
Sets the maximum of health.
 
 
Syntax: Actor.SetMovementControlledByAnimation(true);
Enables or disables animation controlled movement for an actor.
 
 
Syntax: Actor.SetMovementRestriction(true, true)
Sets movement restriction. First param is bAllowSprint and second param is bAllowRun. 
 
Syntax: Actor.SetPhysicalizationProfile( const char *profile )
Sets the physicalization profile.
 
 
Syntax: Actor.SetSearchBeam( Vec3 dir )
Sets the search beam.
 
 
Syntax: Actor.SetSpectatorMode( int mode, ScriptHandle targetId )
Sets the specified spectator mode.
 
 
Syntax: Actor.SetStats()
Sets somes tats for the actor.
set some status of the actor 
 
Syntax: Actor.SetViewLimits( IFunctionHandler *pH,Vec3 dir,float rangeH,float rangeV )
Sets the limit of the view. 
 
Syntax: Actor.SetViewShake( Ang3 shakeAngle, Vec3 shakeShift, float duration, float frequency, float randomness )
Sets the shake movement for the view. 
 
Syntax: Actor.SimulateOnAction( IFunctionHandler *pH,const char *action,int mode,float value )
 
 
Syntax: Actor.StandUp()
Makes the Actor standing up.
 
 
Syntax: Actor.StartFollow(npcEntity)
Start following the NPC.
 
 
Syntax: Actor:StartInteractiveActionByName("ActionName", objectId, true, 1.0)
Starts interactive action.
 
 
Syntax: Actor.StopTimeWarp()
Stops time warp effect
 
 
Syntax: Actor.TrackViewControlled( int characterSlot )
Checks if the track view is controlled.
 
 
Syntax: Actor.UnequipInventoryItem( ScriptHandle itemId )
Unequips item from inventory
 
 
Syntax: Actor.VectorToLocal()
Converts a vector to the local coordinates system. 
 
Time effects ============================================= Syntax: Actor.WarpTime(float wantedSpeed, float duration)
Slowdown/speedup actor animation for given time period 
 
Syntax: actor:WashDirtAndBlood(1, 0.5)
Call when somebody washes himself in the game.
 
 
Syntax: actor:WashItems(1)
Wash all actor items in inventory or his horse 
Copyright (c) 2012. All rights reserved.