ok sorry for the multiple posts, I tried posting earlier, but there seemed to be some problems with the forums, as they were extremely low, I tried to delete the other one, but anyways...
Ok. the problem is this, when I call a switch statement using PlayerReplicationInfo.Team as the switch, while in a team game, it always return the red team...look at the code below:
//some other code........
local int OwnerTeam;
OwnerTeam = Pawn(Owner).PlayerReplicationInfo.Team;
if(Level.Game.bTeamGame)
{
switch(OwnerTeam)
{
case 0:
BroadcastMessage("RedTeam");
tw.SetDisplayProperties(STY_Translucent, Texture'UPML.LDot', true, false);
break;
case 1:
BroadcastMessage("BlueTeam");
tw.SetDisplayProperties(STY_Translucent, Texture'UPML.BlueLDot', true, false);
break;
case 2:
BroadcastMessage("GreenTeam");
tw.SetDisplayProperties(STY_Translucent, Texture'UPML.GreenLDot', true, false);
break;
case 3:
BroadcastMessage("GoldTeam");
tw.SetDisplayProperties(STY_Translucent, Texture'UPML.GoldLDot', true, false);
break;
}
}
as you can see, I have put a BroadcastMessage() to follow up the evaluation of the code. but no matter what happens, it always land on 0 (Red team).
As far as I know the team is an array, with 0=Red, 1=blue, 2=green, 4=gold. Is that correct?
Does anyone knows what's wrong with this?
Is there another way to get the team number of pawn other than this?
Oh and another question, what's the differences a simulated function from a normal one?
Ok. the problem is this, when I call a switch statement using PlayerReplicationInfo.Team as the switch, while in a team game, it always return the red team...look at the code below:
//some other code........
local int OwnerTeam;
OwnerTeam = Pawn(Owner).PlayerReplicationInfo.Team;
if(Level.Game.bTeamGame)
{
switch(OwnerTeam)
{
case 0:
BroadcastMessage("RedTeam");
tw.SetDisplayProperties(STY_Translucent, Texture'UPML.LDot', true, false);
break;
case 1:
BroadcastMessage("BlueTeam");
tw.SetDisplayProperties(STY_Translucent, Texture'UPML.BlueLDot', true, false);
break;
case 2:
BroadcastMessage("GreenTeam");
tw.SetDisplayProperties(STY_Translucent, Texture'UPML.GreenLDot', true, false);
break;
case 3:
BroadcastMessage("GoldTeam");
tw.SetDisplayProperties(STY_Translucent, Texture'UPML.GoldLDot', true, false);
break;
}
}
as you can see, I have put a BroadcastMessage() to follow up the evaluation of the code. but no matter what happens, it always land on 0 (Red team).
As far as I know the team is an array, with 0=Red, 1=blue, 2=green, 4=gold. Is that correct?
Does anyone knows what's wrong with this?
Is there another way to get the team number of pawn other than this?
Oh and another question, what's the differences a simulated function from a normal one?