[Solved] "Is building - True" doesn't work as expected

Level 5
Joined
Jun 24, 2024
Messages
59
Hi again,

i'm currently fighting with the editor, when i set the Option "Is Building" to true.

What i want to achive: A Hero Tower which can level, hold items and is able to turn without movement, needs buildable space below itself and occupies the same space as a generic farm.

What stops me: When i set a custom hero to Building - true, it won't give me the option to set the building hitbox, occupation needed.
Also when placed it starts building with the minimum hp required but the builder is then unable to actually build it. When using repair on it, it says it can't build it because its an organic unit. I looked into turoials like:


- but my unit which is now categorized as a building won't give me the options to truly turn it into a building...

SMOrc
 
Level 30
Joined
Aug 29, 2012
Messages
1,382
Adding the Mechanical classification for your tower may resolve problem number 2

1725639093453.png


As for the building properties, I think that's just how it is, sadly. I've had a look in the Blizzard TD map how they handle hero towers, basically they use a "fake" tower in the build menu, replace it with a hero tower, and then create another fake tower to simulate the ground texture and collision
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Unit-type of (Triggering unit)) Equal to Hero Tower (Fake1)
    • Then - Actions
      • Unit - Replace (Triggering unit) with a Hero Tower (Summonables) using The new unit's max life and mana
      • Set VariableSet TempPoint = (Position of (Triggering unit))
      • Unit - Create 1 Hero Tower (Fake Ground Texture1) for Neutral Passive at TempPoint facing Default building facing degrees
      • Custom script: call RemoveLocation( udg_TempPoint )
    • Else - Actions
 
Level 5
Joined
Jun 24, 2024
Messages
59
That's what i thought as well after testing further, guess i need to use a tower base that gets summoned with the unit build and destroyed when the unit is killed. I also noticed, when a hero gets turned into a building it looses its hero classification aka. Stats and other properties.

Thanks for the tips :)
 
Level 12
Joined
Nov 13, 2010
Messages
277
all you need a building (aka a tower ) and a hero and you replace the tower with the hero and the hero dos get Stats
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Unit-type of (Constructed structure)) Equal to The Tower you made
    • Then - Actions
      • Unit - Remove (Constructed structure) from the game
      • Unit - Replace (Constructed structure) with a The Tower you made using The old unit's relative life and mana
      • Set VariableSet point = (Position of (Last replaced unit))
      • Unit - Create 1 hero you made for (Owner of (Last replaced unit)) at point facing Default building facing degrees
      • Unit - Set life of (Last created unit) to (Percentage life of (Last replaced unit))%
if you need to see it for yourself then my map King maze td is open score
 
Top