AoW_Hun7312
I'm a magic man, I've got magic hands.
- Reaction score
- 76
What is "value" in SetPlayerAlliance() used for?
EDIT: I'm trying to set two forces to be enemies/allies. Am I using this function correctly?
JASS:
native SetPlayerAlliance takes player sourcePlayer, player otherPlayer, alliancetype whichAllianceSetting, boolean value returns nothing
EDIT: I'm trying to set two forces to be enemies/allies. Am I using this function correctly?
JASS:
function setAlliance takes player tagger returns nothing
local player p = GetLocalPlayer()
if (p != tagger) then
if (IsPlayerInForce(p, forceRunners)) then
SetPlayerAlliance(tagger, p, bj_ALLIANCE_UNALLIED, true)
SetPlayerAlliance(p, tagger, bj_ALLIANCE_UNALLIED, true)
endif
if (IsPlayerInForce(p, forceTaggers)) then
SetPlayerAlliance(tagger, p, bj_ALLIANCE_ALLIED_VISION, true)
SetPlayerAlliance(p, tagger, bj_ALLIANCE_ALLIED_VISION, true)
endif
endif
endfunction