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.
I'm not that good with the trigger editor and I really am lost right now. I understand the event you want me to use but I have no idea on the actions to use.
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.
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.
http://wiki.sc2mapster.com/galaxy/triggers/events/mouse-clicked/
just have the trigger check to see if the ability has been toggled and then check the xyz with that function.
I'm not that good with the trigger editor and I really am lost right now. I understand the event you want me to use but I have no idea on the actions to use.
@Keyeszx: Go
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.
Set variable "X" to point from X(mouse clicked world position X) Y(mouse clicked world position Y)
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.
Weird, couldn't edit my previous post.
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.