• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!
  • ✅ The POLL for Hive's Texturing Contest #33 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!

[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