HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Unit in range of destructible

02-28-2006, 01:21 AM#1
SomeStranger
Ok, I searched the forums for awhile with no luck.

I am trying to create a spell which does damage per second to a unit but removes the damage per second buff if the unit leaves the range of trees. I can do this with WEU, but I would prefer to use the normal editor....

Does anyone know an easy way to check if a unit is in range of a tree?
02-28-2006, 01:49 AM#2
Immoralis
pick all destruables within (range here)
actions
if picked destructable = tree
actions..

you need tyo check this often so use a periodic evenr with about .1 seconds
02-28-2006, 02:15 AM#3
SomeStranger
Thanks =) Can't believe I did not realize that.
02-28-2006, 10:56 PM#4
SomeStranger
Ok....I am actually still having trouble with this trigger. Maybe it is something I am doing wrong. Here is what I have so far:

Trigger:
Removal
Collapse Events
Time - Every 0.10 seconds of game time
Conditions
Collapse Actions
Collapse Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Collapse Loop - Actions
Collapse Destructible - Pick every destructible within 250.00 of (Position of (Picked unit)) and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Destructible-type of (Picked destructible)) Not equal to Summer Tree Wall
Collapse Then - Actions
Unit - Remove Fear of the Woods buff from (Picked unit)
Trigger - Turn off (This trigger)
Collapse Else - Actions
Do nothing

In this case Fear of the Woods is the name of my skill and the buff. When I remove the tree picking part the removal of the buff works, so it has nothing to do with the removal.
03-01-2006, 10:56 PM#5
SomeStranger
Ermmm....I still need help....