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

Alliance between Players

Status
Not open for further replies.
Level 2
Joined
Jun 25, 2008
Messages
14
Lets say there is 3 Main Players (Player 10, Player 11 and Player 12) in the game which other players can ally themselves to. These 3 Main Players are hereby called Factions.

If a player (Player 1) allies himself with Player 10, he becomes enemy with Player 11 and Player 12, and all other players that has an alliance with Player 11 and Player 12. Similarly, he (Player 1) is also automatically allied with any other player that has an alliance with Player 10.

The way in which I have done it is to trigger the alliance setting one player by one player which results in the below trigger.

The question: Is there a function of configuring such alliance which does not require setting the alliance player-by-player?

  • Ally with Player 10
    • Events
      • Player - (Player((Integer(1, 2, 3, 4, 5)))) types a chat message containing -Player 10 ally as An exact match
    • Conditions
      • ((Triggering player) is an enemy of Player 10 (Light Blue)) Equal to True
    • Actions
      • Player - Make (Triggering player) treat Player 10 (Light Blue) as an Ally with shared vision
      • Player - Make Player 10 (Light Blue) treat (Triggering player) as an Ally with shared vision
      • Player - Make (Triggering player) treat Player 11 (Dark Green) as an Enemy
      • Player - Make Player 11 (Dark Green) treat (Triggering player) as an Enemy
      • Player - Make (Triggering player) treat Player 12 (Brown) as an Enemy
      • Player - Make Player 12 (Brown) treat (Triggering player) as an Enemy
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 2 (Blue) is an ally of Player 10 (Light Blue)) Equal to True
        • Then - Actions
          • Player - Make (Triggering player) treat Player 2 (Blue) as an Ally with shared vision
          • Player - Make Player 2 (Blue) treat (Triggering player) as an Ally with shared vision
        • Else - Actions
          • Player - Make (Triggering player) treat Player 2 (Blue) as an Enemy
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 3 (Teal) is an ally of Player 10 (Light Blue)) Equal to True
        • Then - Actions
          • Player - Make (Triggering player) treat Player 3 (Teal) as an Ally with shared vision
          • Player - Make Player 3 (Teal) treat (Triggering player) as an Ally with shared vision
        • Else - Actions
          • Player - Make Player 1 (Red) treat Player 3 (Teal) as an Enemy
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 4 (Purple) is an ally of Player 10 (Light Blue)) Equal to True
        • Then - Actions
          • Player - Make (Triggering player) treat Player 4 (Purple) as an Ally with shared vision
          • Player - Make Player 4 (Purple) treat (Triggering player) as an Ally with shared vision
        • Else - Actions
          • Player - Make (Triggering player) treat Player 4 (Purple) as an Enemy
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Player 5 (Yellow) is an ally of Player 10 (Light Blue)) Equal to True
        • Then - Actions
          • Player - Make (Triggering player) treat Player 5 (Yellow) as an Ally with shared vision
          • Player - Make Player 5 (Yellow) treat (Triggering player) as an Ally with shared vision
        • Else - Actions
          • Player - Make (Triggering player) treat Player 5 (Yellow) as an Enemy
 
Level 24
Joined
May 9, 2007
Messages
3,563
Umm, just enter ten seperate triggers or do this.

Player Enters a chat message:

Entered chat substring = ally

If entered chat character 7 = 1 then ally Player one red
If entered chat character 7 = 2 then ally blue.

Sorry that this is not an actual trigger and hence those functions don't exist but there are similar ones that do.
 
Status
Not open for further replies.
Top