Squeekems
TH.net Regular
- Reaction score
- 11
In this 6 player map I am making, there are 6 villages (owned by computer-players 7-12). Each user-player is given a single unit which can be used to assist the villages. Assisting a village is as simple as killing creeps in the village. Doing so gives the user-player reputation with the town. Getting your reputation up with one village brings your reputation down with all the other villages since all of them are at war with each other.
So, when a creep is killed in a town, all of the reputations are displayed for the user-player. I also made it so user-players can simple type "!rep" to see this list. The problem is that the list that shows for the player in this way has a misprint. For the last town, instead of saying the correct name, "Yellowview" (Player 12's name), it says "Player 6." I have no idea why. Here are some of the triggers of the map.
I more to this trigger, but I did not want to spam. I thought it might be necessary for understanding the trigger that handles the list.
[ljass]Reputation[/ljass] is an array of integers. I am using it as a 2-dimensional array. Reputation[((Player Number x 7) + Village Number-6)]. If I need to explain this more, let me know. If you have a better way of doing it, PLEASE let me know. <( >_<)> Lol.
EDIT:
Here's the loop that plays when a creep dies in a village. It works. Again, let me know if you need anything more clear.
So, when a creep is killed in a town, all of the reputations are displayed for the user-player. I also made it so user-players can simple type "!rep" to see this list. The problem is that the list that shows for the player in this way has a misprint. For the last town, instead of saying the correct name, "Yellowview" (Player 12's name), it says "Player 6." I have no idea why. Here are some of the triggers of the map.
I more to this trigger, but I did not want to spam. I thought it might be necessary for understanding the trigger that handles the list.
Trigger:
- Initialization
- Events
- Map initialization
- Conditions
- Actions
- Set Color[0] = |cffFF0000
- Set Color[1] = |cff0000FF
- Set Color[2] = |cff00FFFF
- Set Color[3] = |cff8E35EF
- Set Color[4] = |cffFFFF00
- Set Color[5] = |cffFF8040
- Set Color[6] = |cff00FF00
- Set Color[7] = |cffFAAFBE
- Set Color[8] = |cff736F6E
- Set Color[9] = |cffADDFFF
- Set Color[10] = |cff254117
- Set Color[11] = |cff804000
- Set Color[12] = |cff000000
- For each (Integer A) from 0 to 5, do (Actions)
- Loop - Actions
- Set VillageController[(Integer A)] = (Integer A)
- Loop - Actions
- Events
[ljass]Reputation[/ljass] is an array of integers. I am using it as a 2-dimensional array. Reputation[((Player Number x 7) + Village Number-6)]. If I need to explain this more, let me know. If you have a better way of doing it, PLEASE let me know. <( >_<)> Lol.
Trigger:
- Display Reputation
- Events
- Player - Player 1 (Red) types a chat message containing !rep as An exact match
- Player - Player 2 (Blue) types a chat message containing !rep as An exact match
- Player - Player 3 (Teal) types a chat message containing !rep as An exact match
- Player - Player 4 (Purple) types a chat message containing !rep as An exact match
- Player - Player 5 (Yellow) types a chat message containing !rep as An exact match
- Player - Player 6 (Orange) types a chat message containing !rep as An exact match
- Conditions
- Actions
- Set TempForce = (Player group((Triggering player)))
- For each (Integer A) from 1 to 6, do (Actions)
- Loop - Actions
- Game - Display to TempForce the text: ((Color[((Integer A) + 5)] + (Name of (Player((VillageController[(Integer A)] + 6))))) + (|r: + (String(Reputation[(((Player number of (Triggering player)) x 7) + VillageController[(Integer A)])]))))
- Loop - Actions
- Custom script: call DestroyForce(udg_TempForce)
- Events
EDIT:
Here's the loop that plays when a creep dies in a village. It works. Again, let me know if you need anything more clear.
Trigger:
- For each (Integer A) from 0 to 5, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Village[(Integer A)] contains TempPoint[2]) Equal to True
- Then - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Or - Any (Conditions) are true
- Conditions
- (Owner of (Killing unit)) Equal to Player 1 (Red)
- (Owner of (Killing unit)) Equal to Player 2 (Blue)
- (Owner of (Killing unit)) Equal to Player 3 (Teal)
- (Owner of (Killing unit)) Equal to Player 4 (Purple)
- (Owner of (Killing unit)) Equal to Player 5 (Yellow)
- (Owner of (Killing unit)) Equal to Player 6 (Orange)
- Conditions
- Or - Any (Conditions) are true
- Then - Actions
- Set Reputation[(((Player number of (Owner of (Killing unit))) x 7) + (VillageController[(Integer A)] + 1))] = (Reputation[(((Player number of (Owner of (Killing unit))) x 7) + (VillageController[(Integer A)] + 1))] + 2)
- Set TempForce = (Player group((Owner of (Killing unit))))
- Game - Display to TempForce the text: ((Color[((Integer A) + 6)] + (Name of (Player((VillageController[(Integer A)] + 7))))) + (|r: + (String(Reputation[(((Player number of (Owner of (Killing unit))) x 7) + ((Integer A) + 1))]))))
- Custom script: call DestroyForce(udg_TempForce)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- Or - Any (Conditions) are true
- Conditions
- (Owner of (Killing unit)) Equal to Player 1 (Red)
- (Owner of (Killing unit)) Equal to Player 2 (Blue)
- (Owner of (Killing unit)) Equal to Player 3 (Teal)
- (Owner of (Killing unit)) Equal to Player 4 (Purple)
- (Owner of (Killing unit)) Equal to Player 5 (Yellow)
- (Owner of (Killing unit)) Equal to Player 6 (Orange)
- Conditions
- Or - Any (Conditions) are true
- Then - Actions
- Set Reputation[(((Player number of (Owner of (Killing unit))) x 7) + (VillageController[(Integer A)] + 1))] = (Reputation[(((Player number of (Owner of (Killing unit))) x 7) + (VillageController[(Integer A)] + 1))] - 1)
- Set TempForce = (Player group((Owner of (Killing unit))))
- Game - Display to TempForce the text: ((Color[((Integer A) + 6)] + (Name of (Player((VillageController[(Integer A)] + 7))))) + (|r: + (String(Reputation[(((Player number of (Owner of (Killing unit))) x 7) + ((Integer A) + 1))]))))
- Custom script: call DestroyForce(udg_TempForce)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions