Hey there. It's been a very long time since I've last posted here. Before I explain my problem, I'd like to emphasize that I'm very bad at this and my triggering skills are basic at best, so bear with me.
Anyway... there are two things that I need help with. The map is very basic. I wanted to create a map where one player controls a citadel with a gold mine and some towers, while another controls three dragon roosts that train red dragons, drakes and whelps and gets automated income every second. My first obstacle was the leaderboard for the player who's in charge of the dragons. My intention was to have that player gain one extra gold per second for every 10 units killed, and one extra lumber for every 5 buildings razed (starting income is 10/5), and to have the leaderboard updated accordingly. While I managed to end up doing what I wanted, it's very sloppy, and it revolves using if/then/else triggers with conjunction with disabled triggers that add income and update the leaderboard.
The main problem with my approach is that it involves a lot of c/p, and that there's a limit to how many extra income it generates, and I'm sure there has to be a better way to do it. Anyway it looks like this:
My second problem for this map is that I wanted a functioning AI that could train and send dragons if CPU is in control of dark green slot. First I tried using AI editor, but when that failed miserably, I turned to triggers. Triggers look like this:
The second problem is this last trigger, which is supposed to force all dragons in the area to charge. It does work, but CPU simply overrides this command few seconds later, and forces all dragons to return to the roosts. Any help is much appreciated.
Anyway... there are two things that I need help with. The map is very basic. I wanted to create a map where one player controls a citadel with a gold mine and some towers, while another controls three dragon roosts that train red dragons, drakes and whelps and gets automated income every second. My first obstacle was the leaderboard for the player who's in charge of the dragons. My intention was to have that player gain one extra gold per second for every 10 units killed, and one extra lumber for every 5 buildings razed (starting income is 10/5), and to have the leaderboard updated accordingly. While I managed to end up doing what I wanted, it's very sloppy, and it revolves using if/then/else triggers with conjunction with disabled triggers that add income and update the leaderboard.
The main problem with my approach is that it involves a lot of c/p, and that there's a limit to how many extra income it generates, and I'm sure there has to be a better way to do it. Anyway it looks like this:
-
Resource2
-
Events
- Time - Every 0.10 seconds of game time
- Conditions
-
Actions
- If ((Player 11 (Dark Green) Units Killed) Equal to 10) then do (Trigger - Turn on Resource trigger1 <gen>) else do (Do nothing)
- If ((Player 11 (Dark Green) Units Killed) Equal to 20) then do (Trigger - Turn on Resource trigger2 <gen>) else do (Do nothing)
- If ((Player 11 (Dark Green) Units Killed) Equal to 30) then do (Trigger - Turn on Resource trigger3 <gen>) else do (Do nothing)
- If ((Player 11 (Dark Green) Units Killed) Equal to 40) then do (Trigger - Turn on Resource trigger4 <gen>) else do (Do nothing)
- If ((Player 11 (Dark Green) Units Killed) Equal to 50) then do (Trigger - Turn on Resource trigger5 <gen>) else do (Do nothing)
- If ((Player 11 (Dark Green) Units Killed) Equal to 60) then do (Trigger - Turn on Resource trigger6 <gen>) else do (Do nothing)
- If ((Player 11 (Dark Green) Units Killed) Equal to 70) then do (Trigger - Turn on Resource trigger7 <gen>) else do (Do nothing)
- If ((Player 11 (Dark Green) Units Killed) Equal to 80) then do (Trigger - Turn on Resource trigger8 <gen>) else do (Do nothing)
- If ((Player 11 (Dark Green) Units Killed) Equal to 90) then do (Trigger - Turn on Resource trigger9 <gen>) else do (Do nothing)
- If ((Player 11 (Dark Green) Units Killed) Equal to 100) then do (Trigger - Turn on Resource trigger10 <gen>) else do (Do nothing)
- If ((Player 11 (Dark Green) Units Killed) Equal to 110) then do (Trigger - Turn on Resource trigger11 <gen>) else do (Do nothing)
- If ((Player 11 (Dark Green) Units Killed) Equal to 120) then do (Trigger - Turn on Resource trigger12 <gen>) else do (Do nothing)
- If ((Player 11 (Dark Green) Units Killed) Equal to 130) then do (Trigger - Turn on Resource trigger13 <gen>) else do (Do nothing)
- If ((Player 11 (Dark Green) Units Killed) Equal to 140) then do (Trigger - Turn on Resource trigger14 <gen>) else do (Do nothing)
- If ((Player 11 (Dark Green) Units Killed) Equal to 150) then do (Trigger - Turn on Resource trigger15 <gen>) else do (Do nothing)
- If ((Player 11 (Dark Green) Units Killed) Equal to 160) then do (Trigger - Turn on Resource trigger16 <gen>) else do (Do nothing)
- If ((Player 11 (Dark Green) Units Killed) Equal to 170) then do (Trigger - Turn on Resource trigger17 <gen>) else do (Do nothing)
- If ((Player 11 (Dark Green) Units Killed) Equal to 180) then do (Trigger - Turn on Resource trigger18 <gen>) else do (Do nothing)
- If ((Player 11 (Dark Green) Units Killed) Equal to 190) then do (Trigger - Turn on Resource trigger19 <gen>) else do (Do nothing)
- If ((Player 11 (Dark Green) Units Killed) Equal to 200) then do (Trigger - Turn on Resource trigger20 <gen>) else do (Do nothing)
-
Events
-
Resource trigger1
-
Events
- Time - Every 1.00 seconds of game time
- Conditions
-
Actions
- Player - Add 1 to Player 11 (Dark Green) Current gold
- Leaderboard - Change the value for Player 5 (Yellow) in (Last created leaderboard) to 11
-
Events
-
Resource trigger2
-
Events
- Time - Every 1.00 seconds of game time
- Conditions
-
Actions
- Player - Add 1 to Player 11 (Dark Green) Current gold
- Leaderboard - Change the value for Player 5 (Yellow) in (Last created leaderboard) to 12
-
Events
My second problem for this map is that I wanted a functioning AI that could train and send dragons if CPU is in control of dark green slot. First I tried using AI editor, but when that failed miserably, I turned to triggers. Triggers look like this:
-
AI
-
Events
- Time - Every 1.00 seconds of game time
-
Conditions
- (Player 11 (Dark Green) controller) Equal to Computer
-
Actions
- Unit - Order Red Dragon Roost 0009 <gen> to train/upgrade to a Red Dragon
-
Events
-
AI2
-
Events
- Time - Every 12.00 seconds of game time
-
Conditions
- (Player 11 (Dark Green) controller) Equal to Computer
- (Number of living Red Drake units owned by Player 11 (Dark Green)) Less than 6
-
Actions
- Unit - Order Red Dragon Roost 0101 <gen> to train/upgrade to a Red Drake
-
Events
-
AI3
-
Events
- Time - Every 25.00 seconds of game time
-
Conditions
- (Player 11 (Dark Green) controller) Equal to Computer
- (Number of living Red Dragon Whelp units owned by Player 11 (Dark Green)) Less than 6
-
Actions
- Unit - Order Red Dragon Roost 0102 <gen> to train/upgrade to a Red Dragon Whelp
-
Events
-
AI4
-
Events
- Time - Every 180.00 seconds of game time
-
Conditions
- (Player 11 (Dark Green) controller) Equal to Computer
-
Actions
- Unit Group - Pick every unit in (Units in Dragons <gen>) and do (Unit - Order (Picked unit) to Attack-Move To (Center of Citadel <gen>))
-
Events
The second problem is this last trigger, which is supposed to force all dragons in the area to charge. It does work, but CPU simply overrides this command few seconds later, and forces all dragons to return to the roosts. Any help is much appreciated.