I am working on a map project that fuses elements from hero arenas, dota, footman frenzy. I have the unit spawning down, and then I got another idea to make the map even more insane. Instead of two sides, have 4. Now, the only problem with this, is that I don't know how to make the spawn point destinations selectable. I want it to be configurable so that people can configure thier spawns so that they will attack one of the 3 other peoples bases. I am not sure how to do this, but I will post an example of how my nits are spawned.
Thats a small segment of the code for player 1, and only for the units created at his base (It does the same thing for 5 other players as well, with the same amount of units exept for the 'flank' people which spawn only 1 unit. Note that it is the same for the second force as well) The triggers for reds team mates are the same as well, so if player 2 also had a barracks, they would both have 4 footman at each base, for a total of 8 down the center lane. There are 5 paths in total, and so far, I have 13 repetitions for different units in the coding, as I shortened the coding for the example, and took out the other 11 units. Now, As stated, and a reminder, I want the essential same thing, but for 4 players, and the option to make the spawns run to one of the other 3 enemy bases. Also, If there is any more efficient code to reduce possible lag that others may experiance (I have a rather high end computer, so it is non existant for me in war 3, unless somebody hosting another game that I am in lags.)
Also, if possible, I would like the unit to carry on its previous action if it is issued a new one for right clicking (Like in castle fight, note that I already have all spawns classified as wards so that MIGHT be enough of a deterent, but they can still be commanded)
Once I can get this thing up, I am planning on posting a rough beta, and plan on recruiting people if possible.
- Events
- Time - Every 20 seconds of game time
- Conditions
-
Actions
-
Player Group - Pick every player in Player Group - Player 1 (Red) and do (Actions)
- Loop - Actions
-
If (All conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Region Centered at ((Picked player) start location) with size (384.00, 384.00)) contains (Random unit from (Units owned by (Picked player) of type Barracks))) Equal to True
- Then - Actions
- Unit - Create 1 Swordsman for (Picked Player) at Center of (Region centered at (Player 1 (Red) start location) with size (384.00, 384.00) facing default building facing degrees.
- Unit - Order (Last Created unit) to attack-move to (Center of (Region centered at (Player 8 (pink) start location) with size (3840.00, 384.00)
- Unit - Create 1 Swordsman for (Picked Player) at Center of (Region centered at (Player 1 (Red) start location) with size (384.00, 384.00) facing default building facing degrees.
- Unit - Order (Last Created unit) to attack-move to (Center of (Region centered at (Player 8 (pink) start location) with size (3840.00, 384.00)
-
If - Conditions
-
Else - Actions
- Do Nothing
-
If (All conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Region Centered at ((Picked player) start location) with size (384.00, 384.00)) contains (Random unit from (Units owned by (Picked player) of type Firing Range))) Equal to True
- Then - Actions
- Unit - Create 1 Gunsman for (Picked Player) at Center of (Region centered at (Player 1 (Red) start location) with size (384.00, 384.00) facing default building facing degrees.
- Unit - Order (Last Created unit) to attack-move to (Center of (Region centered at (Player 8 (pink) start location) with size (3840.00, 384.00)
- Unit - Create 1 Gunsman for (Picked Player) at Center of (Region centered at (Player 1 (Red) start location) with size (384.00, 384.00) facing default building facing degrees.
- Unit - Order (Last Created unit) to attack-move to (Center of (Region centered at (Player 8 (pink) start location) with size (3840.00, 384.00)
-
If - Conditions
-
Else - Actions
- Do Nothing
-
Player Group - Pick every player in Player Group - Player 1 (Red) and do (Actions)
Thats a small segment of the code for player 1, and only for the units created at his base (It does the same thing for 5 other players as well, with the same amount of units exept for the 'flank' people which spawn only 1 unit. Note that it is the same for the second force as well) The triggers for reds team mates are the same as well, so if player 2 also had a barracks, they would both have 4 footman at each base, for a total of 8 down the center lane. There are 5 paths in total, and so far, I have 13 repetitions for different units in the coding, as I shortened the coding for the example, and took out the other 11 units. Now, As stated, and a reminder, I want the essential same thing, but for 4 players, and the option to make the spawns run to one of the other 3 enemy bases. Also, If there is any more efficient code to reduce possible lag that others may experiance (I have a rather high end computer, so it is non existant for me in war 3, unless somebody hosting another game that I am in lags.)
Also, if possible, I would like the unit to carry on its previous action if it is issued a new one for right clicking (Like in castle fight, note that I already have all spawns classified as wards so that MIGHT be enough of a deterent, but they can still be commanded)
Once I can get this thing up, I am planning on posting a rough beta, and plan on recruiting people if possible.