#Ancient displaying Health Bar + Selectable through the unseen fog of war
1 messages · Page 1 of 1 (latest)
If you insist on using a building
give it a passive ability:
function modifier_ability_test_passive:OnCreated()
if IsServer() then
self:GetParent():AddNoDraw()
self:StartIntervalThink(0.1)
else
end
end
function modifier_ability_test_passive:OnIntervalThink()
if IsServer() then
if IsLocationVisible(DOTA_TEAM_GOODGUYS, self:GetParent():GetOrigin()) then
self:GetParent():RemoveNoDraw()
self:StartIntervalThink(-1)
end
end
end
add nodraw until anyone reveals this location
so why use a building? replace it with common unit
? create modifier and make it untargetable?
and if in radius/attack range remove the untargettable modifier
is it possible to add a "nodraw" only for one specific team?
No.
You can make it a unit, which is hidden in fog of war
Remember that you're still, in some level, playing in Dota's systems and Dota's rules, even if it's a modification that makes it your own game
Buildings are always visible, by definition, this is how it is in Dota
So if you don't want them to be shown through fog, then you will have to make it a unit that looks and behave like a building - because buildings do not show through fog
Let's brainstorm:
Dont put any building on map at first, use some dummy unit instead ( this is for ally display, the dummy unit has same properties & abilities with original building )
And there's a timer working for them, it checks their location visibility, replace them with normal buildings till their location revealed by any enemy team.
CanBeSeenByAnyOpposingTeam the method works for it