HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Is it somehow possible to...

10-31-2004, 07:53 AM#1
Klownkiller
Is it somehow possible to call the exact size of a building through triggers? I have a tree regrowth triger i have made, but i ran into a problem. The trees grow right through my buildings if i don't remove them from the game when buildings are being built. I know how to create a generic trigger that either uses a generic size for every building, or i could set custom values, but that is way to messy. I just want to be able to use the area that a building occupies. this way the trees right next to the buildings will regrow if they have been destroyed. I have searched the GUI about 400 times to no avail. Maybe some one knows how to do it with jass.
10-31-2004, 04:44 PM#2
n\/Cl34r
Mhmmm ....

MAYBE you could try the following:

Make a custom invisible Unit (which does NOT have locust or ghost) and give it a size of 1. Now, if you want to get the nearly exact measurements of a building, have a trigger create 1 of those units using "Create Unit at [Position of Unit(Your Building)] offset by 10 towards 0 degrees" and another using "Create Unit at [Position of Unit(Your Building)] offset by 10 towards 180 degrees". Now since wc3 can't place those units INSIDE your Building, it plants them just far enough to not to place them in each other, which means a Distance between Points call (Position of custom unit 1, Position of custom unit 2) should now return a value pretty close to the Building's size value.

This is just a though, it could also not work, crash your wc3, detonate your pc, your head, or whatever. The only thing sure is that trigger would leak because of the Position or Unit calls, which have to be replaced by temporal locations and get removed and so on. Just thinking.
10-31-2004, 06:06 PM#3
Klownkiller
That's actually not a bad idea. You could make it fire the first time a building of x-type is built, and then store that value for the next time. it would avoid countless hours filling in custom values, and allow me to let the trees grow right next to the buildings. I'll have to run some tests though. have to make sure the units will always go directly to opposite sides, and not to odd places.
Thanks for the input.
11-14-2004, 03:27 AM#4
Guest
The guy below me likes men.
11-14-2004, 06:51 PM#5
-={tWiStÄr}=-
wow man.. way to revive a thread.. just totaly hijack it on a totaly different topic.