Glorn2 Ohh Captain our Captain
Posts : 3721 Join date : 2009-07-03 Age : 35 Location : Guilford, NY
| Subject: King Of The Hill Mode! Tue May 18, 2010 3:30 pm | |
| Well, sadly, today was a rainy day, and I woke up early. 6 hours later, I have created a King of the Hill Mode, and it is only 1 trigger. - Code:
-
Events Time - Every 2.00 seconds of game time Conditions Actions Set KOTH_Controlled[1] = 0 Set KOTH_Controlled[2] = 0 For each (Integer A) from 1 to 5, do (Actions) Loop - Actions Set KOTH_On_Hill[(Integer A)] = ((Number of units in (Units in KOTH_Hill[(Integer A)] matching ((((Matching unit) is A Hero) Equal to True) and (((Owner of (Matching unit)) is in Team1) Equal to True)))) - (Number of units in (Units in KOTH_Hill[(Integer A)] matching ((((Matching unit) is A If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions KOTH_Hills_Owner[(Integer A)] Not equal to 1 KOTH_On_Hill[(Integer A)] Greater than 0 Then - Actions Set KOTH_Take_Time[(Integer A)] = (KOTH_Take_Time[(Integer A)] - KOTH_On_Hill[(Integer A)]) Multiboard - Set the text for Multiboard_CTF item in column 3, row (4 + (Integer A)) to ( + (String(KOTH_Take_Time[(Integer A)]))) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions KOTH_Take_Time[(Integer A)] Less than or equal to 0 Then - Actions Floating Text - Create floating text that reads Team 1 at (Center of KOTH_Hill[(Integer A)]) with Z offset 10.00, using font size 16.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency Set KOTH_Hills_Owner[(Integer A)] = 1 Multiboard - Set the text for Multiboard_CTF item in column 2, row (4 + (Integer A)) to KOTH_Owner[1] Set KOTH_Take_Time[(Integer A)] = 30 Multiboard - Set the text for Multiboard_CTF item in column 3, row (4 + (Integer A)) to ( + (String(KOTH_Take_Time[(Integer A)]))) Else - Actions Else - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions KOTH_Hills_Owner[(Integer A)] Not equal to 2 KOTH_On_Hill[(Integer A)] Less than 0 Then - Actions Set KOTH_Take_Time[(Integer A)] = (KOTH_Take_Time[(Integer A)] + KOTH_On_Hill[(Integer A)]) Multiboard - Set the text for Multiboard_CTF item in column 3, row (4 + (Integer A)) to ( + (String(KOTH_Take_Time[(Integer A)]))) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions KOTH_Take_Time[(Integer A)] Less than or equal to 0 Then - Actions Floating Text - Create floating text that reads Team 2 at (Center of KOTH_Hill[(Integer A)]) with Z offset 10.00, using font size 16.00, color (0.00%, 100.00%, 0.00%), and 0.00% transparency Set KOTH_Hills_Owner[(Integer A)] = 2 Multiboard - Set the text for Multiboard_CTF item in column 2, row (4 + (Integer A)) to KOTH_Owner[2] Set KOTH_Take_Time[(Integer A)] = 30 Multiboard - Set the text for Multiboard_CTF item in column 3, row (4 + (Integer A)) to ( + (String(KOTH_Take_Time[(Integer A)]))) Else - Actions Else - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions KOTH_Hills_Owner[(Integer A)] Equal to 1 Then - Actions Set KOTH_Controlled[1] = (KOTH_Controlled[1] + 1) Multiboard - Set the text for Multiboard_CTF item in column 2, row 2 to ( + (String(KOTH_Controlled[1]))) Set CTF_TeamScore[1] = (CTF_TeamScore[1] + 1) Multiboard - Set the text for Multiboard_CTF item in column 3, row 2 to ( + (String(CTF_TeamScore[1]))) Set TeamNeeded[1] = (TeamNeeded[1] - 1) Multiboard - Set the text for Multiboard_CTF item in column 4, row 2 to ( + (String(TeamNeeded[1]))) Unit Group - Pick every unit in (Units in KOTH_Hill[(Integer A)]) and do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions KOTH_Hills_Owner[(Integer A)] Equal to 1 ((Picked unit) is alive) Equal to True ((Picked unit) is A Hero) Equal to True Then - Actions Set CTF_TeamScore[1] = (CTF_TeamScore[1] + 1) Multiboard - Set the text for Multiboard_CTF item in column 3, row 2 to ( + (String(CTF_TeamScore[1]))) Set TeamNeeded[1] = (TeamNeeded[1] - 1) Multiboard - Set the text for Multiboard_CTF item in column 4, row 2 to ( + (String(TeamNeeded[1]))) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions KOTH_Take_Time[(Integer A)] Less than 30 Then - Actions Set KOTH_Take_Time[(Integer A)] = (KOTH_Take_Time[(Integer A)] + 1) Else - Actions Else - Actions Else - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions KOTH_Hills_Owner[(Integer A)] Equal to 2 Then - Actions Set KOTH_Controlled[1] = (KOTH_Controlled[2] + 1) Multiboard - Set the text for Multiboard_CTF item in column 2, row 3 to ( + (String(KOTH_Controlled[2]))) Set CTF_TeamScore[2] = (CTF_TeamScore[2] + 1) Multiboard - Set the text for Multiboard_CTF item in column 3, row 3 to ( + (String(CTF_TeamScore[2]))) Set TeamNeeded[2] = (TeamNeeded[2] - 1) Multiboard - Set the text for Multiboard_CTF item in column 4, row 3 to ( + (String(TeamNeeded[2]))) Unit Group - Pick every unit in (Units in KOTH_Hill[(Integer A)]) and do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions KOTH_Hills_Owner[(Integer A)] Equal to 2 ((Picked unit) is alive) Equal to True ((Picked unit) is A Hero) Equal to True Then - Actions Set CTF_TeamScore[2] = (CTF_TeamScore[2] + 1) Multiboard - Set the text for Multiboard_CTF item in column 3, row 3 to ( + (String(CTF_TeamScore[2]))) Set TeamNeeded[2] = (TeamNeeded[2] - 1) Multiboard - Set the text for Multiboard_CTF item in column 4, row 3 to ( + (String(TeamNeeded[2]))) Else - Actions Else - Actions Granted, it is pretty long, and the most annoying/advanced trigger I have ever used. However, because it is a single trigger, using loops, it makes for very few things to go wrong. In fact, you could pretty much copy/paste this, and have your very own King of the Hill map! Once I get all the "mode things" set up, that is, add it to the options, a description, turning off other triggers, ect... I will post back with the official "rules" ***Kay, some rules*** All of this is posted above, but I assume you guys dont speak gibberish, so I will elaborate. You gotta stand on a hill with your hero in order to capture it. The more heroes on a team that are on that hill, the faster it will be capture. Opponents are taken into the equation. If there are 2 from each team, the timer wont move. If there are 4 from 1 team, and 1 from another, the timer will count as if 3 are there (from the larger team). It takes 15 seconds to capture a hill that is unowned. 30 seconds for an owned one. Obviously, timers go faster with more heroes. After you own a hill, you get 1 point per second that it is owned by your team. For every hero on your team, standing on a hill that you own, you gain an additional point every second. There are 5 hills, the 4 mounds that have always been in the game, and the center area with the portals. As with CTF mode, all portals are disabled, and there is an exceptional orb shop in the base. Your team gets 200X average level gold for every hill taken. Heroes get experience every X seconds. (working on this one) | |
|
Sinnar Wanna-Be
Posts : 70 Join date : 2010-03-21 Location : Australia
| Subject: Re: King Of The Hill Mode! Tue May 18, 2010 9:00 pm | |
| sounds good man... cant wait for my net to be back on | |
|