Developer's Blog
Register Low Fi Mark Forums Read

Reply
 
Thread Tools
Old 02-20-2012, 03:37 PM   #1
ubic
Member
 
ubic's Avatar
 
Join Date: Mar 2011
Location: Chile
Posts: 358
ubic is offline

Default Counting trees


There is a way to count the amount of trees arround a unit ? i have problem to storing the trees to be counted only once. I mean if the unit move to a site with less or more it should be decrease or increase the trees count.

there is not a "Destructible group" so, someone know a way to do it ?

thanks c:
  Reply With Quote
Old 02-20-2012, 04:59 PM   #2
MauranKilom
Member
 
MauranKilom's Avatar
 
Join Date: Jan 2010
Location: Germany
Posts: 5,046
MauranKilom is online now
Default Re: Counting trees

Action - Pick every destructible in range (or region, dunno).
Then count them manually, applying your own criteria.
__________________
I might edit my p0sts frequently and rapidly after posting.

DotA code of the week:
Jass:
function Func0243 takes nothing returns nothing
  call Func0242()
endfunction

Fix OD combo! IMPLEMENTED!
  Reply With Quote
Old 02-26-2012, 09:36 PM   #3
Sly_theK1ng
Member
 
Sly_theK1ng's Avatar
 
Join Date: May 2010
Location: Croatia
Posts: 3,618
Sly_theK1ng is offline
Default Re: Counting trees

u have enumdestructablesinrect command
if that helps..
then u can check if each destructable is tree and if is add +1 to ur variable
__________________


steam acc: p4m.F4llenKing
cya in dota 2

Earthshaker war
  Reply With Quote
Reply
  Entertainment Programming


Forum Jump

Thread Tools