Spectator Camera Using WoW API

HairyTreeMan

Grandfathered
Since the patch a few weeks ago, the built in spectator camera has been broken in TBC Classic. As a workaround, I have been using the World of Warcraft API in order to create macros to control everything. In this post, I will provide the macros I am currently using and explain the issues I am still looking to find resolutions for.

When entering the BG, I start with these macros:

1) Turn off Smart Camera
/script C_Commentator.SetUseSmartCamera(false)

2) Increase the camera speed from the default(Adjust this number value as you like)
/script C_Commentator.SetMoveSpeed(80)

3) Set Team Names and Score to 0-0
/script C_Commentator.ResetSeriesScores("teamName1", "teamName2")
/script C_Commentator.AssignPlayersToTeamInCurrentInstance(1, "teamName1")
/script C_Commentator.AssignPlayersToTeamInCurrentInstance(2, "teamName2")

To change the score:
1) Manually set the score
/script C_Commentator.SetSeriesScores("teamName1", "teamName2", "0", "0")
/script C_Commentator.AssignPlayersToTeamInCurrentInstance(1, "teamName1")
/script C_Commentator.AssignPlayersToTeamInCurrentInstance(2, "teamName2")

For snapping and unsnapping the camera to/from players:

1) Snaps the camera to Team 1, Player 1 (factionIndex, playerIndex, forceInstantTransition(boolean))
/script C_Commentator.FollowPlayer(1,1, true)

The following example would snap to Team 2, Player 7:
/script C_Commentator.FollowPlayer(2,7, true)

Issue: The playerIndex seems to go by the order in which players join the BG, not alphabetical order like the default Blizzard spectator camera does. For this reason, it's impossible to know which player is at which playerIndex at the start of each game. As a temporary solution, I make sure to figure out which index each FC is located at and move them to a priority keybind each game.

2) Clears the current target and allows the camera to be freely controlled
/script C_Commentator.ClearCameraTarget()

3) Snaps to current target
/script C_Commentator.FollowUnit("target")

Scripts I wish to use, but haven't had success with:

1) Inspect the current target
/script NotifyInspect("target")

Note: This might not be possible at all in spectator, but would be cool to have.

2) Swap team sides (for the overlay)
/script C_Commentator.SwapTeamSides()

Note: I tried this in the 29 2s tournament and from memory, it swapped only the energy/mana bars of each team. Would need to do more testing.


I will continue to update this post as I experiment more. Please let me know if you discover any solutions for what I have posted here or if you find any features that may be useful. Big thanks to Drew and Staticshot for helping me in DMs during live commentary to get some of these features working. Additional thanks to GLHF for letting me test macros in their splits practices.
 
Last edited:

Users who are viewing this thread

Top