• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Detect the closest doodat

Status
Not open for further replies.
Level 3
Joined
Aug 28, 2009
Messages
53
Can wold edditor detect the closest doodat?? If you know how pplease tell me if you can. (please no vJass. vJass is the last thing, if it is impossible with gui, then vJass) I wolud love to make a tleleport trigger where you press an arrow key and you move to the closest doodat (invisible).
 
Level 2
Joined
Apr 30, 2010
Messages
14
First of all: If you mean "destructables" and not "doodads", then yes: It can be done.

So you need to do the following:

  • Set ClosestRange=99999999
  • Set ClosestDestr=No destructable
  • Destructable - Pick every destructable in Region/Circle and do:
    • Set Temp_Real=Distance between Destructable and your point/whatever.
    • if Temp_Real < ClosestRange then
      • Set ClosestRange=Temp_Real
      • Set ClosestDestr= Picked Destructable
    • endif
freehanded
 
Level 8
Joined
Jun 26, 2010
Messages
530
If you mean doodads, like props and etc, i'm afraid you can't. But you can create a destructible with your prop model and make it invulnerable.
 
Status
Not open for further replies.
Top