Jump to content

How would I make 2 players hostile to eachother?


Recommended Posts

Posted

Almost the same way 2 alliance characters can be hostile to eachother when joining an arena, I would like to make a specific character hostile to another - how would I do this?

I have played around with

        SetFFAPvP(true);
       SetPvP(true);
       UpdatePvP(true,true);

to no avail. I have also tried

            SetBGTeam(469);
and
           SetBGTeam(67);

but still the characters are friendly to eachother.

I basically want to make two teams, blue team must be hostile to red team. Most of my code is in place, but no idea how to make *teams* hostile to eachother.

Same thing for making horde friend to alliance if they are in same *team* (blue/red)

Can anyone help!?

Thanks =]

Posted
if(teamID == 1)

{

pvpInfo.inHostileArea = true;

SetContestedPvP();

SetBattleGroundId(GetInstanceId(),BATTLEGROUND_AA);

SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE );

SetBGTeam(67);

setFaction(67);

//setFactionForRace(67);

}

else if(teamID == 2)

{

pvpInfo.inHostileArea = true;

SetContestedPvP();

SetBattleGroundId(GetInstanceId(),BATTLEGROUND_AA);

SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE );

SetBGTeam(469);

setFaction(469);

//setFactionForRace(469);

}

As you can see, ive tried everything to get these two *teams* in a hostile state =|

Nothing seems to work.

Posted

Thanks Faramir118 -

Just for reference, I got this right by setting the player's DUEL TEAM id.

Seems simple enough and works 100% for my purpose.

SetUInt32Value(PLAYER_DUEL_TEAM, 0)

1 for team 1

2 for team 2

0 for none

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use