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

[Trigger] Alliances

Status
Not open for further replies.
Level 10
Joined
Jun 10, 2007
Messages
557
So, I'm making a Vampirism-like map, and I'm wondering how precisely you make a player ally a group of players and un-ally another group. I would have thought this was straightforward, but using the following didn't really work.

  • MythtoSpawn
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Nymph (Fey Builder)
          • (Unit-type of (Triggering unit)) Equal to Ghost (Spirit Builder)
          • (Unit-type of (Triggering unit)) Equal to Warlord (Giant Builder)
          • (Unit-type of (Triggering unit)) Equal to Dune Runner (Beast Builder)
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Player Group - Pick every player in (All allies of Player 9 (Gray)) and do (Actions)
        • Loop - Actions
          • Player - Make (Owner of (Triggering unit)) treat (Picked player) as an Ally with shared vision
          • Player - Make (Owner of (Picked unit)) treat (Owner of (Triggering unit)) as an Ally with shared vision
      • Custom script: set bj_wantDestroyGroup = true
      • Player Group - Pick every player in (All enemies of Player 9 (Gray)) and do (Actions)
        • Loop - Actions
          • Player - Make (Owner of (Triggering unit)) treat (Picked player) as an Enemy
          • Player - Make (Owner of (Picked unit)) treat (Owner of (Triggering unit)) as an Enemy
(I deleted pieces of the trigger that weren't relevant to the question, this isn't the whole thing but it shouldn't matter)

My testers were kind of vague, but from what I can tell, it just didn't work. They did not ally the killing player when they died and they did not un-ally their former allies. Any help would be appreciated.
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
  • Player Group - Pick every player in (All allies of Player 9 (Gray)) and do (Actions)
  • Player - Make (Owner of (Picked unit)) treat (Owner of (Triggering unit)) as an Ally with shared vision
Maybe it doesn't work because there's no Picked unit, but only a Picked player. :wink:
 
Level 10
Joined
Jun 10, 2007
Messages
557
  • Player Group - Pick every player in (All allies of Player 9 (Gray)) and do (Actions)
  • Player - Make (Owner of (Picked unit)) treat (Owner of (Triggering unit)) as an Ally with shared vision
Maybe it doesn't work because there's no Picked unit, but only a Picked player. :wink:

:cred: Thanks for pointing that out.

Just_Spectating said:
also, i think that setting your groups into a variable and then deleting it with the custom script is what your supposed to do.

Hmm... I'll try that, then. Thanks!
 
Status
Not open for further replies.
Top