• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

give building ability to build

Status
Not open for further replies.
Level 5
Joined
Aug 19, 2015
Messages
68
Hi,
edit: i chose the additional building in the builder build menu as simplest workaround in my case.


Problem: (TL;DR)
I tried giving a building a build ability, but the new building can be placed on itself even though the space is displayed as red. (just like a unit can build something at the spot it's standing, the building gets moved to a free space too if there is one)
Any nice solution for this?

Requirements:
- the new structure will be built just next to the casting building.
- there will only be space for one of these additional structures.
- the trigger/etc needs to be fail safe

Ideas:
(I) when the unit enters map, get buildings in the surrounding area matching (one of the 5 possible) source buildings and check range to that building (if too small range, remove)
(II) when the source building is issued with the ability, check distance to the targeted point and if too close, get units of player matching the additional structure unit type
(III) build the additional structure with the builder
(IV) place a second building on the area where the casting (source) building is built

Why I dont just do that:
(I) needs a unit group and a rect.. i can make it leak safe but i find this really dirty
(II) just 1 unit group, well.. still kinda dirty
(III) would need another building in the build menu which doesnt feel very well structured because i want everything at the same place
(IV) dummy units? there has to be a simpler solution

Background, why i actually need this:
You guys probably know vampirism/tag maps right?
(you have a resource-generating building which can only be build on grass, there are 2 slots for these buildings per base)
i'm working on a new solobase concept so that every base can be efficiently used as a solo player.
there are 38 bases on the map, so the best solution (checking if the other slot is free) would be a lot of work and possibly not very performant
 
Last edited:
Status
Not open for further replies.
Top