I was wondering how to retrieve the xyz position of where the mouse is clicked when an ability is used. So if you normally click there it does nothing. If you press A for an ability and then click in a position I want it to tell where that location is and if there is anything between the unit using the ability and the position. If something is inbetween then the ability will hit there instead.
when you enter the dialog where you choose a function just search "mouse" and look shouldn't be too hard. And the function has to be for a real value since the return value of the mouse position X, Y or Z is a real value.
So am I using a trigger or a function? This is really just confusing me even more. I understand what I need it to do. I just don't know how to do it. Does anyone know a trigger tutorial that can teach me how to find general things and understand how to use them?
The whole 'point from x y' is just a way to return a value. So you would make an action in a trigger. Like set variable or something. And then you could use the 'point from x y' to get a certain value. So say you wanted to make a unit at the point
create unit at point (point from xy)
or set a variable "set variable (point1) to (point from xy)"
The 'point from xy' just returns a value and is used inside an action.
Rollback Post to RevisionRollBack
Feel free to Send me a PM if you have any questions/concerns!
1 - Create the event. Set it to "Any player clicks..."
2- Create a variable of the "point" type"
3- Create an action and choose "Set variable". Select the variable you just created, I used "Mouse coords". Select the X Value. From the function tab (left most) select "Mouse X position clicked in the world"
4- Rpeat 2-3 for the Y and Z coordinates.
You probably want to make the variable a global so it can be used by other triggers. I just did it as a local to make the pretty screenshot.
Edit: Cleaned up to be a single variable, less confusing that way.