HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Detecting a doodad

05-23-2005, 04:07 AM#1
Limb_Smasher
Is there anyway to detect when someone is near a tree or a rock?
05-23-2005, 04:34 AM#2
Zandose
Are you asking to detect when a unit is near a tree or when a unit comes within range of a certain doodad?
05-23-2005, 04:37 AM#3
Zandose
Anyways I have to go so here's what I think you want.
Code:
Untitled Trigger 001
    Events
        Time - Every 1.00 seconds of game time
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Distance between (Position of Peasant 0000 <gen>) and (Position of Summer Tree Wall 0000 <gen>)) Less than or equal to 100.00
            Then - Actions
                Game - Display to (All players) the text: Distance is less th...
            Else - Actions
                Game - Display to (All players) the text: Distance is more th...
05-23-2005, 10:56 AM#4
Jackyquah
Or you can just create a region at doodad and used unit enter regions event.
05-27-2005, 12:04 AM#5
Limb_Smasher
is there a way to detect all the trees, or just each tree individually?
05-27-2005, 10:20 AM#6
Earth-Fury
each individually. there are ways to do it, but they are messy, not 100%, and too darn complex.
05-27-2005, 11:19 AM#7
EdwardSwolenToe
pick every doodad in range?
05-27-2005, 09:21 PM#8
Earth-Fury
yeah, but thats a messy complicated way that may not even work at all, if properly.