| 03-13-2007, 06:42 PM | #1 |
Hey all, I recently found out that this site has came back online after dying what seems years ago. I'm working on a couple of things just for fun but I need some help, I've forgot alot of what I use to know. First I'm wondering how I can make it so if you double click an item in a hero's inventory it will cause a trigger to occur. The second thing I'm wondering if I can some how make it so when I create a unit in a random point within a region, it's so far away from destructables like trees. I'm really happy to see WC3C back online, it's gotten me back into the ol' World Editor. ![]() |
| 03-13-2007, 10:45 PM | #2 |
To create something in a random unit in an area you can do this (Yes it leaks) No Events No Conditons Actions: Pick random point in (reigion) (Im pretty sure theres a gui funct that can pick a random point) and do If / Then / Else If a <object> is within X of picked point Then run (This trigger) Else do create 1 <unit> at point. |
| 03-16-2007, 01:03 PM | #3 |
as for the double click, maybe you could have an item with an instant dummy spell, which when used, replaces the item with a different one for .5 seconds before switching it back to the original. If the instant dummy spell on the second item gets cast, then you just got a double click. |
| 03-16-2007, 02:23 PM | #4 |
I have an easy way to detect double right click. Just messing with some order ids... If you use a tome spell with +0 stats point as ability for the item you can use a timer to detect double click. the real deal would be differentiating a single click from the first click of a double click, I think that what windows does is have a delay, so no click between the delay means single click. |
