HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Show/hide Doodads not working :(

03-21-2007, 11:47 PM#1
botanic
any ideas why this is not working?

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
Set tempregion = ((Region centered at (Position of (Triggering unit)) with size (300.00, 300.00)) offset by (0.00, 300.00))
Set tempregion2 = (Region centered at (Position of (Triggering unit)) with size (300.00, 300.00))
Collapse Destructible - Pick every destructible in tempregion and do (Actions)
Collapse Loop - Actions
Destructible - Hide (Picked destructible)
Wait until ((tempregion2 contains (Triggering unit)) Equal to False), checking every 0.50 seconds
Destructible - Show (Picked destructible)
03-22-2007, 02:00 AM#2
FatalError
EDIT: Never mind, I read that wrong. What exactly is it doing wrong?


PS: That leaks like hell. About 4 leaks per event. I suggest you read about memory leaks. There's plenty of tutorials.
03-22-2007, 04:43 AM#3
botanic
the problem is that it does nothing... as for the leaks where is it leaking ( it now destroys the point in the second trigger
03-24-2007, 02:20 AM#4
botanic
bump please someone help..
03-24-2007, 02:30 AM#5
Pyrogasm
You need JASS. That region is being reset, the trigger leaks events, and I don't think the offsets are helping anything.