GSC reference › Built-in
CamAnimScripted()
Built-in (engine)
Server
Plays the camera script on a player.
Signature
CamAnimScripted(<player>, <cam_anim>, <start_time>, <align_origin>, <align_angles>, [lerp_duration], [camera_name], [ignoreProcessingInitialNoteTracks])
Parameters
| Name | Required? | Details |
|---|---|---|
| player | Required | The player to play animation on |
| cam_anim | Required | The animation to play |
| start_time | Required | The start time of the animation |
| align_origin | Required | The origin to align to |
| align_angles | Required | The angles to align to |
| lerp_duration | Optional | The lerp duration |
| camera_name | Optional | The camera name |
| ignoreProcessingInitialNoteTracks | Optional | Ignores processing the initial notetracks if the camera time starts earlier |
Example (from Treyarch's docs)
CamAnimScripted( player, "proto_melee_cam", gettime(), origin, angles )
Real uses in BO3's scripts
Called 2 times in the decompiled scripts. A few, zombies first:
- scripts/shared/scene_shared.gsc, line 3544
camanimscripted(player, _s.cameraswitcher, n_start_time, v_origin, v_angles); - scripts/shared/scene_shared.gsc, line 3548
camanimscripted(player, _s.cameraswitchergraphiccontents, n_start_time, v_origin, v_angles);
Related built-ins
- AnimScripted()Runs an animscript on an entity.
- StopAnimScripted()Halts animscript on this entity.
- IsPlayingAnimScripted()Returns true if the entity is playing in scripted animation.
- EndExtraCamAnimScripted()Ends the extracam 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.
- UseAnimTree()Sets the anim tree for the entity
- ClearAnim()Sets an animation's goal weight (and the goal weights of all of its descendents) to zero over the specified time.
- SetAnim()Restart": These functions cause the animation to restart.
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).