• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] Alliance Mechanic question

Status
Not open for further replies.

ABM

ABM

Level 7
Joined
Jul 13, 2005
Messages
279
hi,

what does these constant do?
ALLIANCE_PASSIVE
ALLIANCE_HELP_REQUEST
ALLIANCE_HELP_RESPONSE
ALLIANCE_SHARED_XP
ALLIANCE_SHARED_SPELL
ALLIANCE_SHARED_VISION
ALLIANCE_SHARED_VISION_FORCED
ALLIANCE_SHARED_CONTROL
ALLIANCE_SHARED_ADVANCED_CONTROL

if i set:
[Jass=]function Trig_Untitled_Trigger_001_Actions takes nothing returns nothing
call SetPlayerAllianceStateBJ( ConvertedPlayer(udg_A1), Player(bj_PLAYER_NEUTRAL_EXTRA), bj_ALLIANCE_UNALLIED_VISION )
endfunction[/code]
the GUI version is set player(A1) treat player Neutral EXtra as an enemy with shared vision.

which player can see wich player in this case?
what about the constant what do setting them to true do?

thanks for your help ^^
 
[jass=]//***************************************************************************

//*

//* Alliance Utility Functions

//*

//***************************************************************************



//===========================================================================

function SetPlayerAllianceBJ takes player sourcePlayer, alliancetype whichAllianceSetting, boolean value, player otherPlayer returns nothing

// Prevent players from attempting to ally with themselves.

if (sourcePlayer == otherPlayer) then

return

endif



call SetPlayerAlliance(sourcePlayer, otherPlayer, whichAllianceSetting, value)

endfunction



//===========================================================================

// Set all flags used by the in-game "Ally" checkbox.

//

function SetPlayerAllianceStateAllyBJ takes player sourcePlayer, player otherPlayer, boolean flag returns nothing

call SetPlayerAlliance(sourcePlayer, otherPlayer, ALLIANCE_PASSIVE, flag)

call SetPlayerAlliance(sourcePlayer, otherPlayer, ALLIANCE_HELP_REQUEST, flag)

call SetPlayerAlliance(sourcePlayer, otherPlayer, ALLIANCE_HELP_RESPONSE, flag)

call SetPlayerAlliance(sourcePlayer, otherPlayer, ALLIANCE_SHARED_XP, flag)

call SetPlayerAlliance(sourcePlayer, otherPlayer, ALLIANCE_SHARED_SPELLS, flag)

endfunction



//===========================================================================

// Set all flags used by the in-game "Shared Vision" checkbox.

//

function SetPlayerAllianceStateVisionBJ takes player sourcePlayer, player otherPlayer, boolean flag returns nothing

call SetPlayerAlliance(sourcePlayer, otherPlayer, ALLIANCE_SHARED_VISION, flag)

endfunction



//===========================================================================

// Set all flags used by the in-game "Shared Units" checkbox.

//

function SetPlayerAllianceStateControlBJ takes player sourcePlayer, player otherPlayer, boolean flag returns nothing

call SetPlayerAlliance(sourcePlayer, otherPlayer, ALLIANCE_SHARED_CONTROL, flag)

endfunction



//===========================================================================

// Set all flags used by the in-game "Shared Units" checkbox with the Full

// Shared Unit Control feature enabled.

//

function SetPlayerAllianceStateFullControlBJ takes player sourcePlayer, player otherPlayer, boolean flag returns nothing

call SetPlayerAlliance(sourcePlayer, otherPlayer, ALLIANCE_SHARED_ADVANCED_CONTROL, flag)

endfunction



//===========================================================================

function SetPlayerAllianceStateBJ takes player sourcePlayer, player otherPlayer, integer allianceState returns nothing

// Prevent players from attempting to ally with themselves.

if (sourcePlayer == otherPlayer) then

return

endif



if allianceState == bj_ALLIANCE_UNALLIED then

call SetPlayerAllianceStateAllyBJ( sourcePlayer, otherPlayer, false )

call SetPlayerAllianceStateVisionBJ( sourcePlayer, otherPlayer, false )

call SetPlayerAllianceStateControlBJ( sourcePlayer, otherPlayer, false )

call SetPlayerAllianceStateFullControlBJ( sourcePlayer, otherPlayer, false )

elseif allianceState == bj_ALLIANCE_UNALLIED_VISION then

call SetPlayerAllianceStateAllyBJ( sourcePlayer, otherPlayer, false )

call SetPlayerAllianceStateVisionBJ( sourcePlayer, otherPlayer, true )

call SetPlayerAllianceStateControlBJ( sourcePlayer, otherPlayer, false )

call SetPlayerAllianceStateFullControlBJ( sourcePlayer, otherPlayer, false )

elseif allianceState == bj_ALLIANCE_ALLIED then

call SetPlayerAllianceStateAllyBJ( sourcePlayer, otherPlayer, true )

call SetPlayerAllianceStateVisionBJ( sourcePlayer, otherPlayer, false )

call SetPlayerAllianceStateControlBJ( sourcePlayer, otherPlayer, false )

call SetPlayerAllianceStateFullControlBJ( sourcePlayer, otherPlayer, false )

elseif allianceState == bj_ALLIANCE_ALLIED_VISION then

call SetPlayerAllianceStateAllyBJ( sourcePlayer, otherPlayer, true )

call SetPlayerAllianceStateVisionBJ( sourcePlayer, otherPlayer, true )

call SetPlayerAllianceStateControlBJ( sourcePlayer, otherPlayer, false )

call SetPlayerAllianceStateFullControlBJ( sourcePlayer, otherPlayer, false )

elseif allianceState == bj_ALLIANCE_ALLIED_UNITS then

call SetPlayerAllianceStateAllyBJ( sourcePlayer, otherPlayer, true )

call SetPlayerAllianceStateVisionBJ( sourcePlayer, otherPlayer, true )

call SetPlayerAllianceStateControlBJ( sourcePlayer, otherPlayer, true )

call SetPlayerAllianceStateFullControlBJ( sourcePlayer, otherPlayer, false )

elseif allianceState == bj_ALLIANCE_ALLIED_ADVUNITS then

call SetPlayerAllianceStateAllyBJ( sourcePlayer, otherPlayer, true )

call SetPlayerAllianceStateVisionBJ( sourcePlayer, otherPlayer, true )

call SetPlayerAllianceStateControlBJ( sourcePlayer, otherPlayer, true )

call SetPlayerAllianceStateFullControlBJ( sourcePlayer, otherPlayer, true )

elseif allianceState == bj_ALLIANCE_NEUTRAL then

call SetPlayerAllianceStateAllyBJ( sourcePlayer, otherPlayer, false )

call SetPlayerAllianceStateVisionBJ( sourcePlayer, otherPlayer, false )

call SetPlayerAllianceStateControlBJ( sourcePlayer, otherPlayer, false )

call SetPlayerAllianceStateFullControlBJ( sourcePlayer, otherPlayer, false )

call SetPlayerAlliance( sourcePlayer, otherPlayer, ALLIANCE_PASSIVE, true )

elseif allianceState == bj_ALLIANCE_NEUTRAL_VISION then

call SetPlayerAllianceStateAllyBJ( sourcePlayer, otherPlayer, false )

call SetPlayerAllianceStateVisionBJ( sourcePlayer, otherPlayer, true )

call SetPlayerAllianceStateControlBJ( sourcePlayer, otherPlayer, false )

call SetPlayerAllianceStateFullControlBJ( sourcePlayer, otherPlayer, false )

call SetPlayerAlliance( sourcePlayer, otherPlayer, ALLIANCE_PASSIVE, true )

else

// Unrecognized alliance state - ignore the request.

endif

endfunction
[/code]
 

ABM

ABM

Level 7
Joined
Jul 13, 2005
Messages
279
Almia thanks for your answer but i have JNG
so what you copy pasted i can access anytime, what i want to know is what they do?
not as function but as what they really do to the game mechanics, how they affect the gameplay?

i think ALLIANCE_PASSIVE set the relation to neutral
so probably the spell wich target neutral will be able to target the player who is ALLIANCE_PASSIVE , true.
the SHARED_VISION mean you can see the other player...
what is SHARED_VISION_FORCED?
what is the difference between SHARED_CONTROL and SHARED_CONTROL_ADVANCED?
is there no tutorial about that and how alliance work and affect gameplay?
what is HELP_RESPONSE and HELP_REQUEST?
SHARED_XP does it mean the ally will get some part of the player XP gained from killing unit?
SHARED_SPELL what does that mean? what happen if this is set to true or false?

also i would like confirmation about this:
if player 1 treat player 2 as enemy with vision
does that mean player can see player 2 and is enemy to player 2? or the opposite?
 

ABM

ABM

Level 7
Joined
Jul 13, 2005
Messages
279
Almia first of all thanks a lot for trying hard to help...

but are you sure of what you are talking about?
[Trigger=]
Initialisation mêlée
Events
Conditions
Actions
Joueur - Make Joueur 1 (Rouge) treat Joueur 2 (Bleu) as an Ally with shared vision
Joueur - Make Joueur 1 (Rouge) treat Joueur 2 (Bleu) as a Neutral with shared vision
Joueur - Make Joueur 1 (Rouge) treat Joueur 2 (Bleu) as an Ennemi with shared vision
[/Trigger]

so these GUI function are completly stupid and useless and were made by Drunk blizzard programmer?
when you choose ally you can set with or Without vision.
same as all other setting: neutral and enemy

in function Jass you can see that all function are separate into diverse constant with boolean flag...
so you are saying that when you set alliance enemy vision, the game set alliance enemy no vision? so what is the use of this function?

about the rest you didn't explain anything i asked...
you are very kind to try to help and answer... so thank a lot for your time, but what i need is someone who actually know and can answer.
if it is guessing, i allready made many guess, but the game programation need boolean true or false... no maybe.

:)
 
Status
Not open for further replies.
Top