| 11-12-2006, 04:07 PM | #1 |
is there any possible way to make an event based on "left click"? selection is disabled in my map. my map's a shooter. you currently use right click to move and have to click F+click to fire, wich is really annoying to do. is there any possible way i could make it you just need to left click to trigger the shooting? |
| 11-12-2006, 04:26 PM | #2 |
There are 2 ways. 1st way is to make a periodic event, but it's nasty way. 2nd way is using Unit - A unit Is issued an order targeting an object |
| 11-12-2006, 04:39 PM | #3 | |
Quote:
no...my map is a shooter map...when you click somewhere on the map you shoot. its not an object. its a point. secondly, your founction of issued an order is for right click, not left click. |
| 11-12-2006, 04:46 PM | #4 |
Or you could use the selection event. Quasi-slow response on Bnet, but that's the nicest way to go about it. |
| 11-12-2006, 05:13 PM | #5 | |
Quote:
If you already had arrow keys to move couldnt you just use the unit is issued an order targeting a point(move) then it would fire? |
| 11-12-2006, 06:00 PM | #6 |
Yes, using trackables. You would have to create trackables all over the map in order to be able to detect where the player clicks. Here's a tutorial on using trackables. http://www.wc3jass.com/viewtopic.php?t=1997 |
| 11-12-2006, 06:09 PM | #7 | |
Quote:
allright.thanks. but im really not familiar with jass =/ ill try to learn, tough. itll also be very laggy if i have to put 12 (one for each player) on every single points of the map =/ ill wait to see all solutions before i take one. |
| 11-12-2006, 06:14 PM | #8 | |
Quote:
i dont have arrow keys to move. also, if i right clicked, the unit would move there AND shoot, as the default for right clicking is move. |
| 11-12-2006, 09:58 PM | #9 | |
Quote:
The problem with trackables is, they can't tell you if it was a left or a right click that clicked them, however I've heard that if they intercept a click then the order that should be issued by it isn't issued so you can't differentiate between the two mouse buttons this way either. |
| 11-12-2006, 11:13 PM | #10 |
If you weren't using right-click for moving, that could much more easily be used in an event for firing. You just have a few events for when a unit is issued an order targeting a point, object, etc. And then make the condition check the order to see if it is the "smart" order. |
| 11-13-2006, 02:57 PM | #11 |
And trackables can never be removed, as blizzard dident make a function to do so. The only 4 functions there is, is: JASS:native CreateTrackable takes string trackableModelPath, real x, real y, real facing returns trackable constant native GetTriggeringTrackable takes nothing returns trackable native TriggerRegisterTrackableHitEvent takes trigger whichTrigger, trackable t returns event native TriggerRegisterTrackableTrackEvent takes trigger whichTrigger, trackable t returns event Register trackable Hit, is when you click on that trackable. Register trackable track is when you mouse over the trackable. You can use any model for a trackable. KaTTaN made a bombing type map, where you click the terrain and it makes an explosion there. He uses 128x128 invisable models. I dont have the link but if you search you might find it. |
