how do i create 5 random towers, select 1 and make rest blocking stones?

mad_man1983

New Member
Reaction score
3
i'm working on a td where the builder makes 5 random towers each round, but i have no clue how to select 1 tower and transform the 4 others to blocking stones, it will be the same thing as in BK's Gem TD if you have played that
 

Bloodcount

Starcraft II Moderator
Reaction score
297
Well....

a unit begins the effect of an ability.
ability being cast equal to (the ability that turns the tower into a gem)
Pick evry unt of type tower owned by triggering player. Replace picked unit with stone(the stone dummy unit)
 

mad_man1983

New Member
Reaction score
3
Well....

a unit begins the effect of an ability.
ability being cast equal to (the ability that turns the tower into a gem)
Pick evry unt of type tower owned by triggering player. Replace picked unit with stone(the stone dummy unit)
this is the trigger for making a tower random that i use, do i need to do that some other way then? cause i don't understand how what you say will work, and i'm not sure how to make that dummy unit either, i'm kinda a noob at some of this stuff

Random Tower
Events
Unit - A unit Finishes construction
Conditions
(Unit-type of (Triggering unit)) Equal to Random Tower
Actions
Set Random_Tower = (Random integer number between 1 and 2)
If (Random_Tower Equal to 1) then do (Unit - Replace (Triggering unit) with a tower1 using The old unit's relative life and mana) else do (If (Random_Tower Equal to 2) then do (Unit - Replace (Triggering unit) with a tower2 using The old unit's relative life and mana) else do nothing
 

bOb666777

Stand against the ugly world domination face!
Reaction score
117
Random Tower
Events
Unit - A unit Finishes construction
Conditions
(Unit-type of (Triggering unit)) Equal to Random Tower
Actions
Set Random_Tower = (Random integer number between 1 and 2)
If (Random_Tower Equal to 1) then do (Unit - Replace (Triggering unit) with a tower1 using The old unit's relative life and mana) else do (If (Random_Tower Equal to 2) then do (Unit - Replace (Triggering unit) with a tower2 using The old unit's relative life and mana) else do nothing

Trigger:
  • Random Tower
    • Events
      • Unit - A unit Finishes construction
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Random Tower
    • Actions
      • Set Random_Tower = (Random integer number between 1 and 2)
      • If (Random_Tower Equal to 1) then do (Unit - Replace (Triggering unit) with a tower1 using The old unit's relative life and mana) else do (If (Random_Tower Equal to 2) then do (Unit - Replace (Triggering unit) with a tower2 using The old unit's relative life and mana) else do nothing
        • Unit Group - Add (Last Replaced Unit) to RandomGroup[Player Number of (Owner Of (Last Replaced Unit))]


Trigger:
  • RandomKeepTower
    • Events
      • Timer - TimeLeftForBuilding Expires
    • Conditions
    • Actions
      • Player Group - Pick all players in (All Players Matching (Matching Player is a User equak to true and Matching User is Playing equal to true)
        • Unit Group - Pick all units in (Random 4 units from RandomGroup[Player Number of (Picked Player)] and do
          • Unit - Replace (Picked Unit) with a RockBlocker
          • Unit Group - Clear (RandomGroup[Player Number of (Picked Player)]


Well yeah, this leaks, but I'm too lazy to clean them xD
But it should work ^^
(RandomGroup is an array unit group variable)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top