• Team_spectator
    10 replies, posted
Appearently TEAM_SPECTATOR differs from all other teams. When I try this: [lua] pl:SetTeam(TEAM_SOMETHING) pl:Spectate(OBS_MODE_ROAMING) pl:SetMoveType(MOVETYPE_NOCLIP) [/lua] Then the player is still affected by gravity with some weird prediction. However, if I set the team to TEAM_SPECTATOR everything seems to be fine.
MOVETYPE_OBSERVER capz
Tried it, didn't work. It's for OBS_MODE_CHASE anyway.
I faced this problem, the way I solved it was like so. [lua]function GM:PlayerSpawn( player ) if ( player:Team() != TEAM_SPECTATOR ) then player:UnSpectate() else player:Spectate( OBS_MODE_CHASE ) end end[/lua] Hope it works for you, because it did for me.
The problem is that I want to have this free roam spectating mode for other teams, not just TEAM_SPECTATOR.
Do you want it when they die? Or so that they can Spectate anytime?
Spectate anytime.
Then just make it a simple ConCommand in init.lua. [lua]function StartSpectate( player ) player:Spectate( OBS_MODE_ROAMING ) end concommand.Add( "SpectateMe", StartSpectate )[/lua] It worked for my gamemode, should for yours.
What team were you on when you did that? As I said it only works properly if you are in the spectating team.
I was on a custom team, and it worked.
Alright, I will check it later, maybe I did something wrong.
Sorry, you need to Log In to post a reply to this thread.