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

Changing Team Condition Request

Status
Not open for further replies.
Level 3
Joined
Jan 21, 2011
Messages
46
My english s**** sorry for that :vw_sad:

I have 4 teams in my map, each team has 3 players and I want this condition if team 1, 2, 3 or 4 has destroyed the main Base of team 1, 2, 3 or 4, the team will treat as an ally of the team who has destroyed the base. +rep for those who helped me. :wink:
 
Last edited:
Level 3
Joined
Jan 21, 2011
Messages
46
It's not working here's the trigger

  • Events
    • Unit - A unit Dies
  • Conditions
    • (Unit-type of (Triggering unit)) Equal to Castle
  • Actions
    • Player - Make (Owner of (Triggering unit)) treat (Owner of (Killing unit)) as an Ally
 
It's not working here's the trigger

  • Events
    • Unit - A unit Dies
  • Conditions
    • (Unit-type of (Triggering unit)) Equal to Castle
  • Actions
    • Player - Make (Owner of (Triggering unit)) treat (Owner of (Killing unit)) as an Ally

In this situation your saying the castle is the killing unit, therefore you have to use dying unit.

In other Words:
Triggering unit = The unit that killed the castle
Killing Unit = ^^^
Dying unit = The Castle

It should look like this:
  • Events
    • Unit - A unit Dies
  • Conditions
    • (Unit-type of (Dying unit)) Equal to Castle
  • Actions
    • Player - Make (Owner of (Triggering unit)) treat (Owner of (Killing unit)) as an Ally
You use dying unit instead of triggering unit because triggering unit is the person who attacked the castle and therefore not what you want.

I may be mis-interpreting what you want here, however.
 
Level 19
Joined
Apr 10, 2010
Messages
2,789
@MasterDragons
I think youre wrong.

Triggering Unit = The unit which activated the trigger, or in other words the doer of the event. In this case, the one which died.
Killing Unit = The unit which killed the doer of the event/Triggering Unit.
Dying Unit = Triggering Unit
Triggering Player = The player who owns Triggering Unit.

@yvanj2000
I think it would be like this:
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Castle
    • Actions
      • Player - Make (Owner of (Killing unit)) treat (Triggering player) as an Ally
Tested and works perfectly.
Also, you would need an indexer so it could be MUI and MPI.
 
Level 19
Joined
Apr 10, 2010
Messages
2,789
Hmm, for that I think you should use Pick Every Player in Player Group.
Maybe something like:
  • Set TempForce[1] = (All allies of Player 1 (Red))
  • Player Group - Pick every player in TempForce[1] and do (Actions)
    • Loop - Actions
      • Player - Make (Picked player) treat Player X (This would be the Player you would want make as your ally) as an Ally with shared vision
  • Custom script: call DestroyForce(udg_TempForce[1])
You would also include a condition to detect if the player is an Ally of Force 1 or 2.
 
Status
Not open for further replies.
Top