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

[Solved] Allied Vision doesnt seem to work

Status
Not open for further replies.
Level 4
Joined
Jul 14, 2012
Messages
100
So I've put together this trigger, so that when someone has researched something called Pact, it sets an integer that corresponds to that player equal to one.

scrnsht3.png


That way, when a player tries to ally, it requires that both people have this research. However, i only did this to allow Allying without shared vision, and I wanted another tech required that would allow shared vision as well. This tech is called Mapping, and is also an integer array set up as above. I thus made the following trigger...

scrnsht4.png


But it doesnt give shared vision to the person who has Mapping. I re-read it over and over but I dont see whats wrong with it. A little help?
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Alliances are not automatically mutual. When you set Player A to treat Player B as an ally, that does not mean that player B also treats player A as an ally.

And please do not write this separately for every player/combination. Save all colors in correspondence to the player number in an array, add the chat events via a loop to a single trigger, form a substring of the entered line containing the color one wants to ally with and determine the belonging player again to be able to use these variables instead of having everything static.
 
Level 4
Joined
Jul 14, 2012
Messages
100
Alliances are not automatically mutual. When you set Player A to treat Player B as an ally, that does not mean that player B also treats player A as an ally.

And please do not write this separately for every player/combination. Save all colors in correspondence to the player number in an array, add the chat events via a loop to a single trigger, form a substring of the entered line containing the color one wants to ally with and determine the belonging player again to be able to use these variables instead of having everything static.


I'm aware that alliances are not automatically mutual. Thats why I have it set up where, for example, Player 1 would have to be an ally of Player 2 in order for player 1 to receive vision of Player 2's units. Rather than Player 2 being an ally of player 1, which would not be fair if player 2 chose not to have player 1 as an ally, and player 1 got to see his vision anyway.

I would like to clarify that when me and a friend tested it, i got vision of his units but he didnt get vision of mine. When he typed "-ally red", he got vision of my units but I lost vision of his. When i typed "-ally blue" again, it took away his shared vision and I got shared vision of his units.

Also, I just learned yesterday how to do that thing you just mentioned with making all the events where each player types a substring then making them ally off of that, but considering that I want to make a lot of conditions on allying, that trigger would be extremely fat, and it would be really hard to read and see for imperfections. And since I already had it triggered like this for all my allying, I decided not to go out of my way to replace them all.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Ally is not a subset of Ally with shared vision and the action not additive. When you make player A treat player B as an Ally and the previous state was being an Ally with shared vision, the shared vision will be overwritten because Ally sets it to false. Either ask for the prior state or set aspects of the alliance separately (Player - Set Aspect of Alliance).
 
Level 4
Joined
Jul 14, 2012
Messages
100
Ally is not a subset of Ally with shared vision and the action not additive. When you make player A treat player B as an Ally and the previous state was being an Ally with shared vision, the shared vision will be overwritten because Ally sets it to false. Either ask for the prior state or set aspects of the alliance separately (Player - Set Aspect of Alliance).

OOHH!! Haha okkay okay i see it now. Woow I cant believe something like that dodged me. That it was being overwritten as an ally xD hahah ok thanks a lot, its working now :D
 
Status
Not open for further replies.
Top