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

Line Tower Wars Question!!! ++REP!!!

Status
Not open for further replies.
Level 4
Joined
Jan 29, 2009
Messages
79
hey..i want to make a map like Line Tower Wars(LTW) and i have some problems

Example
|Red|Blue|Teal|Pur.|
|Yell|Ora.|Gre.|Pink|

Bases..then all Red Buying units will spawn at Blue Base...
But if blue is not playing or Lost Before i want them to spawn at Teal Base or
if Teal is not palying or lost before i want them to spawn at Purple Base..Etc...

Do you know how to do this?
thanks
+Rep
 
Level 22
Joined
Dec 31, 2006
Messages
2,216
Make a boolean for death:
DeathBool
If it is true, go to the next place,
if it is false you spawn the units there,,
You can use that method, but with a boolean array instead and use a loop to loop through possible spawn locations.
Like this:
  • Actions
    • For each (Integer A) from 1 to 8, do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • DeathBool[(Integer A)] Equal to False
          • Then - Actions
            • Unit - Create X Units for SOME_PLAYER at SpawnPoint[(Integer A)] facing Default building facing degrees
            • Custom script: exitwhen true
          • Else - Actions
The variable SpawnPoint is an array containing all possible spawn locations.
Remember to set the variable DeathBool[PlayerNumber] to true when someone loses.
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
If you dont know anything about variables i suppose you learn about them
It is a really important thing in WE,,
Without variables you wont be able to do much,,
And it will get awefully leaky,,

Check tutorial section,, it has enough
DeathBool is an Boolean array variable ;)

Also, immediately take the tutorial about arrays, gives you much information
And please dont dubble post:grin:
(use edit button on bottom of the last post
Only post again if someone has answered, or if there hasnt been a comment for 24 hours)
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
SpawnPoint is a Point variable with array, if you set array size to 1 you can use it up to 8191, You can set it to 8, so you can only use 8 array 'size' ,,
Choose, it makes almost no difference
 
Level 9
Joined
Jun 7, 2008
Messages
440
Uh, would you have a problem if/when you switch the varibale to true?? I mean once a player "loses/dies" you have to switch the boolean array to true. It would almost be easier to check each time you have units entering an area. I played Ltw alot on RoC. I dont know if it is on TFT or not, but What ive seen, i dont have an open copy of the map, but i think ive recreated the trigger(s):
NOTE: You have to create the triggers for all players, As all players can train the same units.
  • Events
    • Unit - a unit enters a region
  • Conditions
  • Owner of (Entering unit) belongs to player 1 (red)
  • Actions
    • If (all conditions are true) Then do (then actions) Else do (else actions)
      • If Conditions
        • BlueDeath equal to false
          • Then Actions
            • Unit - Move (entering unit) instantly to BlueSpawn
              • Else Actions
                • If (all conditions are true) Then do (then actions) Else do (else actions)
                  • If Conditions
                    • TealDeath equal to false
                      • Then Actions
                        • Unit - Move entering unit instantly to TealSpawn
                          • Else Actions
  • --- --- Continue on for all players --- ---
BlueDeath/TealDeath: Boolean Variable (Need one for every player)
BlueSpawn/TealSpawn: Regions Created (Need one for every player)
EDIT: Sorry i forgot to add something last night.
You also need a trigger so that when a player loses the Boolean switchs to "true". OR during the Map Initialization, if the player isnt playing you have to set the boolean to "true".
 
Last edited:
Status
Not open for further replies.
Top