substance
New Member
- Reaction score
- 34
Working on a '-balance' system on my map and im trying to setup alliance changes. The names for all the types, however, are vague and I dont know what most do. So If I move a player from the red team to the blue team, I would assume I'd do something like :
That doesnt work, so how should I got about doing it? And does 'ALLIANCE_SHARED_ADVANCED_CONTROL' do anything? it doesnt seem to work.
**edit**Oh and I tried a loop too, but it didnt work either :
JASS:
call SetForceAllianceStateBJ(RedTeam,BlueTeam,bj_ALLIANCE_UNALLIED)
call SetForceAllianceStateBJ(RedTeam,RedTeam,bj_ALLIANCE_ALLIED)
call SetForceAllianceStateBJ(BlueTeam,RedTeam,bj_ALLIANCE_UNALLIED)
call SetForceAllianceStateBJ(RedTeam,RedTeam,bj_ALLIANCE_ALLIED)
That doesnt work, so how should I got about doing it? And does 'ALLIANCE_SHARED_ADVANCED_CONTROL' do anything? it doesnt seem to work.
**edit**Oh and I tried a loop too, but it didnt work either :
JASS:
if IsPlayerInForce(movingplayer, RedTeam) then
loop
exitwhen i == 12
if IsPlayerInForce(Player(i), RedTeam) then
call SetPlayerAlliance(Player(i), movingplayer, ALLIANCE_PASSIVE, true)
call SetPlayerAlliance(Player(i), movingplayer, ALLIANCE_HELP_REQUEST, true)
call SetPlayerAlliance(Player(i), movingplayer, ALLIANCE_HELP_RESPONSE, true)
call SetPlayerAlliance(Player(i), movingplayer, ALLIANCE_SHARED_XP, true)
call SetPlayerAlliance(Player(i), movingplayer, ALLIANCE_SHARED_SPELLS, false)
call SetPlayerAlliance(movingplayer, Player(i), ALLIANCE_PASSIVE, true)
call SetPlayerAlliance(movingplayer, Player(i), ALLIANCE_HELP_REQUEST, true)
call SetPlayerAlliance(movingplayer, Player(i), ALLIANCE_HELP_RESPONSE, true)
call SetPlayerAlliance(movingplayer, Player(i), ALLIANCE_SHARED_XP, true)
call SetPlayerAlliance(movingplayer, Player(i), ALLIANCE_SHARED_SPELLS, false)
endif
set i = i + 1
endloop