PDA

View Full Version : Team Check


Donator
13th Sep 2003, 03:42 AM
Please help. Need to perform a team check, so that people on team red have red shields, and people on team blue have blue shields. Something along the line of

if (injured.PlayerReplicationInfo.GetHumanReadableName()=="Red")

or

if (injured.PlayerReplicationInfo.TeamID==1)

which I just can't seem to get to work or find done somewhere else to rip from...

Smoke39
13th Sep 2003, 01:41 PM
if ( Level.Game.bTeamGame && Injured.PlayerReplicationInfo.Team == 1 )

Donator
13th Sep 2003, 03:46 PM
Damn! Well, I WAS pretty close :p

Donator
13th Sep 2003, 03:59 PM
Ah... nope. Doesn't work. "Types are incompatible with ==", probably since "team" is defined of type "TeamInfo", not bool or int or whatsoever.

EvilDrWong
14th Sep 2003, 01:18 AM
then use the teamindex

if ( Level.Game.bTeamGame&&Injured.PlayerReplicationInfo.Team.TeamIndex == 1 )

Smoke39
14th Sep 2003, 02:45 AM
Interesting. I'll try to keep that in mind the next time I feel like checking someon's team, as opposed to seeing if it's the same as someone else's.

Donator
14th Sep 2003, 03:08 AM
Incidently, it STILL does produce a similar error (" type mismatch in = "), even I don't understand WHY this time, as TeamIndex actually IS defined "int". So what the f... is wrong with that?!

Smoke39
14th Sep 2003, 01:06 PM
:con: This is from part of the link gun code:
if (Instigator.PlayerReplicationInfo.Team == None || Instigator.PlayerReplicationInfo.Team.TeamIndex == 0)
WTF indeed.

SamMaster
15th Sep 2003, 11:45 AM
I'm stumped