[UT2004] Enemy or Ally of PlayerOwner?

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

TaoPaiPai

Commisaire Van Loc
Jun 13, 2000
1,626
0
0
Matnik
Visit site
If it's a team game just compare the two teams (playerReplicationInfo.team),if it's a more complex gampelay and you have the teams for each controller,go in TeamAI (or SquadAI I don't remember which one) there's a function friendlyToward that should return how bot should behave toward another pawn.
 

SharQueDo

Ph34r me!
Dec 22, 2003
63
0
0
36
The Netherlands
localhost
I'm gonna try something else. A sort of a 'hunter' game. With a radar.

I have 3 sort of blips on the radar:
Orange (players) - when no-one is the hunter
Red (hunter)
Green (non-hunters)

Do I have to assign a bool in a custom pawnclass and use (in dm/hud classes): if(!Pawn.bIsHunter){}else{}?

Or can I make a variable 'travel' from my custom gametype-class to my custom hud-class? So when a hunter is assigned the blips turn green, but one (that one turns red).
 
Last edited: