HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Triggering destructable?

03-21-2007, 03:43 PM#1
botanic
I am trying to set it so that My map hides all trees that have a unit in a rect that is 300x300 and offset by 300 from that destructable. I was trying something like this... Any ideas?

Trigger:
HideTrees Setup
Collapse Events
Time - Elapsed game time is 5.00 seconds
Conditions
Collapse Actions
Collapse Destructible - Pick every destructible in (Entire map) and do (Actions)
Collapse Loop - Actions
Trigger - Add to HideTrees <gen> the event (Unit - A unit enters ((Region centered at (Position of (Picked destructible)) with size (300.00, 300.00)) offset by (0.00, -300.00)))

Trigger:
HideTrees
Events
Conditions
Collapse Actions
Custom script: local destructable HIDETREE = GetTriggerDestructable()
Custom script: call ShowDestructableBJ( false, HIDETREE )
Wait until ((((Region centered at (Position of (Triggering unit)) with size (300.00, 300.00)) offset by (0.00, 300.00)) contains (Triggering unit)) Equal to False), checking every 0.50 seconds
Custom script: call ShowDestructableBJ( true, HIDETREE )
03-21-2007, 06:35 PM#2
tamisrah
You might try this system
http://www.wc3campaigns.net/showthread.php?t=85952
while I test your solution.

Edit: Oh sorry, have got your question wrong... No as far as I know there's no easy way to refer to a triggering destructable, but there might be a way to get it with a work around but getting a triggering widget and convert it to a destructable doesn' work although it's the way blizzard refers to dying destructables.