GSC reference › Built-in
AnimScripted()
Built-in (engine)
Server
Called on: entity
Runs an animscript on an entity.
Signature
<entity> AnimScripted(<notify>, <origin>, <angles>, <animation>, [mode], [root], [rate], [blend], [lerp], [animation time], [is_scene_animation], [showPlayerWeaponInFirstPerson])
Called on an entity: entity AnimScripted(...)
Parameters
| Name | Required? | Details |
|---|---|---|
| notify | Required | The notify to send |
| origin | Required | The starting position of the anim script |
| angles | Required | The starting angle of the anim script |
| animation | Required | The animation |
| mode | Optional | Valid modes are "normal" and "deathplant" |
| root | Optional | The root animation |
| rate | Optional | The playback rate of animation |
| blend | Optional | The blend time for the animation |
| lerp | Optional | The lerp time for an aligned animation |
| animation time | Optional | The starting animation time in 0-1 range |
| is_scene_animation | Optional | Should be true for player scene animations or scripted animations where the player has no control, can be ignored for non-players |
| showPlayerWeaponInFirstPerson | Optional | determines if the first person player should have his weapon during cinematics |
Example (from Treyarch's docs)
driver AnimScripted( "germantruck_driver_closedoor", org , angles, driver.closedooranim )
Real uses in BO3's scripts
Called 116 times in the decompiled scripts. A few, zombies first:
- scripts/zm/_zm_ai_astro.gsc, line 463
self animscripted("headbutt_anim", self.origin, self.angles, "ai_zm_dlc5_zombie_astro_headbutt"); - scripts/zm/_zm_ai_faller.gsc, line 352
self animscripted("fall_anim", self.origin, self.zombie_faller_location.angles, "ai_zm_dlc5_zombie_ceiling_emerge_01"); - scripts/zm/_zm_ai_mechz_claw.gsc, line 963
self animscripted("flamethrower_anim", self.origin, self.angles, "ai_zombie_mech_ft_burn_player"); - scripts/zm/_zm_ai_monkey.gsc, line 2227
self animscripted("attack_perk_anim", self.attack.origin, self.attack.angles, perk_attack_anim); - scripts/zm/_zm_spawner.gsc, line 701
self animscripted("barricade_enter_anim", self.first_node.zbarrier.origin, self.first_node.zbarrier.angles, "ai_zombie_barricade_enter_m_...
Related built-ins
- StopAnimScripted()Halts animscript on this entity.
- IsPlayingAnimScripted()Returns true if the entity is playing in scripted animation.
- IsInScriptedState()Checks if actor is in a scripted state (animscripted, custom, negotiation)
- EndExtraCamAnimScripted()Ends the extracam camera script on a player.
- CamAnimScripted()Plays the camera script on a player.
- EndCamAnimScripted()Ends the camera script on a player.
- ExtraCamAnimScripted()Plays the camera script on an extracam player.
- GetCurrentAnimScriptedName()Get current frame for the given animation when its running.
- SetHideonClientWhenScriptedAnimCompleted()Hides the entity on the client side onces its scripted animation ends
- SetHideWhenScriptedAnimationCompleted()When playing a scene this will hide the entity when the scripted animation ends on it.
New to GSC?
Start with the basics, or paste a compile error to get the fix.
Built-in descriptions, parameters and examples come from Treyarch's BO3 mod tools docs. Usage links point at shiversoftdev/t7-source (decompiled BO3 scripts).