UE2 - UT2kX Team recognition

  • 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.

[RMD]rOckaliEn

New Member
Jul 4, 2008
9
0
0
Is there away of creating an area around a node in onslaught that recognizes whether or not the player entering the area is friend or foe(same team or not)?
 

IronMonkey

Moi?
Apr 23, 2005
1,746
0
36
62
Scotland
www.margrave.myzen.co.uk
Depending on what you want to do, I imagine that you could extend one of the volume classes and override the method that is relevant to your application.

For example, I needed a damage volume that would damage players but not invasion monsters so I updated the CausePainTo method,

Code:
//=============================================================================
// DamageAllBarMonstersVolume.
// This actor can be used to damage bots and players
// but not invasion monsters
//=============================================================================
class DamageAllBarMonstersVolume extends PhysicsVolume
    placeable;

function CausePainTo(Actor Other)
{
    local float depth;
    local Pawn P;

    // FIXMEZONE figure out depth of actor, and base pain on that!!!
    depth = 1;
    P = Pawn(Other);
if ( P != class'Monster' )
{
some secret sauce goes here
}
}
defaultproperties
{
}
In your case, you should be able to query the Pawn for its team number (Pawn.uc has a function GetTeamNum()) and do something with that.
 
Apr 11, 2006
738
0
16
Maybe check out Team Specific Actors v2 (Google it). Not sure if it fits exactly what you want to do, but it's probably a good start.
 

[RMD]rOckaliEn

New Member
Jul 4, 2008
9
0
0
Thanks for the response guys.

Looks like I need to learn some code.

GetTeamNum() of node.
Is node locked?
GetTeamNum() of player entering area.

Time to hit the books...

peace