Raised This Month: $ Target: $400
 0% 

[TF2] Attaching a model to Spectators?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
404UserNotFound
BANNED
Join Date: Dec 2011
Old 08-17-2014 , 21:35   [TF2] Attaching a model to Spectators?
Reply With Quote #1

This is something I've wanted to do for a long time but I've no real clue how, as I don't think Spectators are considered actual players, like people on RED/BLU are.

Any ideas?
404UserNotFound is offline
Konkey Dong
Junior Member
Join Date: Feb 2013
Old 08-17-2014 , 22:42   Re: [TF2] Attaching a model to Spectators?
Reply With Quote #2

you can spawn as spectator (with your class' model) so yes attached models would work.

I wanted to create a 3> team DM gamemode a while ago but gave up as fire and stuff gets wonky.

Last edited by Konkey Dong; 08-17-2014 at 22:43.
Konkey Dong is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 08-17-2014 , 23:24   Re: [TF2] Attaching a model to Spectators?
Reply With Quote #3

Quote:
Originally Posted by Konkey Dong View Post
you can spawn as spectator (with your class' model) so yes attached models would work.

I wanted to create a 3> team DM gamemode a while ago but gave up as fire and stuff gets wonky.
Neat. See, I just want to attach "models/tools/camera/camera.mdl" to any players who are spectator, but also add another element to it by having the camera move up/down based on where the player is looking.

EDIT: That's the fake spectator team thing. I mean an actual legit spectator.

Last edited by 404UserNotFound; 08-17-2014 at 23:34.
404UserNotFound is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 08-18-2014 , 01:49   Re: [TF2] Attaching a model to Spectators?
Reply With Quote #4

Quote:
Originally Posted by abrandnewday View Post
Neat. See, I just want to attach "models/tools/camera/camera.mdl" to any players who are spectator, but also add another element to it by having the camera move up/down based on where the player is looking.
I actually had a conversation on here about this exact same idea. In addition to cameras, another idea was tiny Monoculus' or perhaps mono eyeball rockets.

It's been on my list-of-shit-to-do for like 6 months now. :\ In any case, you should just be able to spawn some sort of entity into the world, and then teleport it to the player OnGameFrame().
__________________

Last edited by ddhoward; 08-18-2014 at 01:50.
ddhoward is offline
404UserNotFound
BANNED
Join Date: Dec 2011
Old 08-18-2014 , 03:55   Re: [TF2] Attaching a model to Spectators?
Reply With Quote #5

Quote:
Originally Posted by ddhoward View Post
I actually had a conversation on here about this exact same idea. In addition to cameras, another idea was tiny Monoculus' or perhaps mono eyeball rockets.

It's been on my list-of-shit-to-do for like 6 months now. :\ In any case, you should just be able to spawn some sort of entity into the world, and then teleport it to the player OnGameFrame().
Here's the thing; while patching up the !saveloc/!teleport plugin for ArchangelGabriel to prevent Spectators from using !saveloc in inappropriate areas and then teleporting into them, as well as dead people, I discovered that IsPlayerAlive returns false for Spectators. They aren't considered "alive", so they may not be considered actual players.

As for OnGameFrame, I really don't like using that (potential lag issues, if memory serves). Gotta be a better way....maybe some sort of SetCustomModel (or whatever it is that Model Manager uses, I forget the function name) on a Spectator.

One other issue I have is the Spectators blocking players views or general trollery via the model.
404UserNotFound is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 08-18-2014 , 04:29   Re: [TF2] Attaching a model to Spectators?
Reply With Quote #6

Quote:
Originally Posted by abrandnewday View Post
I discovered that IsPlayerAlive returns false for Spectators. They aren't considered "alive", so they may not be considered actual players.
?? I really don't understand how this text is relevant?

Quote:
As for OnGameFrame, I really don't like using that (potential lag issues, if memory serves).
Only if you're doing ridiculously expensive things. A simple entity teleport is no issue at all.

Quote:
Gotta be a better way....maybe some sort of SetCustomModel (or whatever it is that Model Manager uses, I forget the function name) on a Spectator.
I do not believe that this will be possible.
__________________
ddhoward is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:34.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode