Enhanced Spectator

Discussions about Coding and Scripting
Post Reply
Marscaleb
Average
Posts: 48
Joined: Tue Jun 07, 2016 6:50 am

Enhanced Spectator

Post by Marscaleb »

I had this idea last weekend for a mod. First of all, I am curious if anyone has made anything close to this already (I did some searching and didn't find anything, but sometimes things are labeled wrong and/or fall through the cracks.) Failing that, I'm curious if anyone has any pointers for a few things I haven't worked with before in Unreal Script.

I'm thinking of a mod that makes spectating easier and more practical. I'd like something so I can set up a large screen at my next tournament that is just spectating the game, but I don't want to have to constantly baby the spectator screen to show something entertaining, especially with the default manner that the game handles spectators.

At the very least, I want to always spectate from the player's POV, not this external camera. Constantly typing "Behindview 0" into the console every time I switch who I'm viewing is just impractical. I can edit user.ini to bind a key to behindview 0 so that I can swap to that view easily, but it still has to be done every time I view from a different player.

Also, selecting a player to view is impractical. So far as I know, all I can do is constantly hit the fire key to cycle through players in a linear fashion, plus an extra "own camera" that I personally don't care for. I can't jump to a specific player, or even just move back to the one I was just viewing.

First of all I'm curious if anyone has made any mods that address these issues already.

Failing that, I'll have to create my own. And to that end, this is what I'm thinking.
I'm thinking i'd like the mod to automatically find the player in the lead and follow them in the first person view. Any time someone scores a point, it checks to see if the viewed player still has the highest score, and if not, it will then switch to view the leader from their first person perspective. Possibly for CTF games it might also jump to the perspective of any player who has picked up a flag.
Furthermore, I'd like to have a mini scoreboard on the screen. Perhaps in the top-right corner. Just showing the names and score of the top four or five players; something that is overall discreet.
And then I'll try to tweak a few features. Maybe when switching views it might start in third person for a second or two to make the transition less jarring. Maybe not use the first person view for bots. I wonder if I could make the camera fly to the new person being viewed from, like they do in the attract on the PS2 version.

Anyway, there are a couple things I have never done before with such a mod.
First of all, this would have to apply only to spectators. Is there a command that checks if a player is a spectator or not? That would be pretty dang important.
Second of all, I'm wondering how I ought to approach it overall. If we're talking a network game here, who has to have the mod on their machine? Is it possible to only require the spectator to have the mod? (I imagine not, but I still wonder.) I guess I can create this as a mutator for the server, but I've never messed with the actual spectator mode before, so if anyone has any advice I am completely welcome to it.

And then I would need to create a mini scoreboard. I've never created a new HUD element before. Has anyone seen a tutorial on the subject that can make the learning process go a little smoother? It seems like the kind of thing that someone has probably made before. If not I guess I'll just have to deal.

Thanks for any support/advice you can offer.
ShaiHulud
Adept
Posts: 459
Joined: Sat Dec 22, 2012 6:37 am

Re: Enhanced Spectator

Post by ShaiHulud »

Higor's X_Spec addresses some - though not all - of the issues/ideas you've listed
User avatar
sektor2111
Godlike
Posts: 6403
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Enhanced Spectator

Post by sektor2111 »

Marscaleb wrote:Is there a command that checks if a player is a spectator or not?
I'm not sure what you mean. In game player is a TournamentPlayer and Spectator is a child of the same class, this child being called CHSpectator - these are two different things/pawns. As I know so far spectators are not really shown in Scoreboards because is... pointless, they do not play.
Marscaleb wrote:Is it possible to only require the spectator to have the mod?
Mutators and all sort of actors involved in game are ordered by server not client - client has a few options perhaps some of them really not needed... eh.
Fact and Question: At a moment some player might have problems with something and you wanna see it immediately for figuring what's going on. How is supposed mod to read your mind for viewing that player since you want to see the best one as I could see ?
Post Reply