HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Detect a left click?

10-09-2007, 08:51 PM#1
botanic
is there any way to do that?

Also is there any way to detect a click and drag?
10-09-2007, 09:18 PM#2
cohadar
ROFL


(what else could I say...)
10-09-2007, 09:38 PM#3
Zandose
I can think of two ways to detect a click. Placing units all over the map and use triggers to detect it or using trachables.

Trackables themselfs are a bucket of problems. They don't know left from right clicking, they can't be removed, etc... If your still interested check out the tutorial at http://www.wc3jass.com/viewtopic.php?t=1997

For the click and drag I got no idea.
10-09-2007, 09:39 PM#4
Captain Griffen
Selection events. Laggy, though.
10-09-2007, 09:43 PM#5
botanic
why cant wc3 have a GetMousePosition() function? Well then here is my problem I want to make a spell that the user can "Draw" glyphs ect or w/e for different effects. IE a circle freezes everything in it a square ignites them on fire and a tetragonal just like super uber pwnes em... or w/e :P
10-09-2007, 09:47 PM#6
Zandose
What about whenever the unit wants to cast a spell stop the unit, create a bunch of models (circles?) around the unit, creating a couple of rings of circles, let the player left-click them, then you make a line model between the two models.

1. Hero - Player starts ability
2. Triggers - Create ?10? rings of small circles around the hero using units
3. Player - Selects the 'small circle' plotting points
3. Triggers - Connect the points with a ability (like chain lightning, life drain, custom model, etc...) to create a symbol
10-09-2007, 09:52 PM#7
botanic
Cuz... that would look funky :/ much rather have a click drag circle thingy :/

and also larger size would mean less effect for each unit in it and there would be no way to increese the size...
10-09-2007, 09:53 PM#8
Zandose
You've kind of lost me on that last post.
Quote:
and also larger size would mean less effect for each unit in it and there would be no way to increese the size...
10-09-2007, 10:01 PM#9
botanic
the effects of the spell woud diminish with the size of the object so making a verrrry small one would do a lot to a small area but a large one would make less effect to more area
10-09-2007, 11:33 PM#10
darkwulfv
I don't think what you want to do is possible to begin with. Dragging shapes with your mouse (which will make the selection box in the first place) is not detectable without insane amounts of selection events and a bunch of units to accompany it.
10-09-2007, 11:48 PM#11
Ammorth
achieving black and white casting styles is not something that can be replicated easily.

You could have the player order a unit to move to each vertex of a shape, to draw the spell (I don't think that would be so bad). You would just cancel the order and set the point of issued order to the point of the shape.
10-10-2007, 02:13 AM#12
PandaMine
Yeah with all those selection events and units the spell could also create some lag

You gotta hate this as much as you gotta hate blizzard making no way to destroy/move destructables or not being able to detect pings
10-10-2007, 02:56 AM#13
Vexorian
I would be happy just by being able to call functions declared bellow the calling line with the same speed as a normal call...
10-10-2007, 03:02 AM#14
botanic
would it work to make the ability channeling and use right click and the target point option and have them click the corners? (after each click order the unit to channel again :/)

PS: what is black and white?
10-10-2007, 03:04 AM#15
MaD[Lion]
u can detect a left click by the feeling on your finger when u left click, or you can detect it with your eyes/ears