- Joined
- Jul 12, 2010
- Messages
- 1,746
alright guys so I'm having problems with these:
native BlzGetTriggerPlayerMouseX
native BlzGetTriggerPlayerMouseY
native BlzGetTriggerPlayerMousePosition
Triggers for testing:
I guess I must be using it wrong?
Because this doesn't work either:
They fail to get mouse position or X/Y and instead return center of playable map.
Only when using it with a mouse detection system I can get it to work:
So I guess it's an easy work-around to have a system save the X/Y of the mouse and just use that when you have to but I was wondering if there is a way to just get the X/Y only when needed.
I'm also afraid of performance issues when saving X/Y of all players when there is a mouse move because that's pretty much all the time when playing.
native BlzGetTriggerPlayerMouseX
native BlzGetTriggerPlayerMouseY
native BlzGetTriggerPlayerMousePosition
Triggers for testing:
-
Test
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to Blink
-
-

Actions
-


Custom script: set udg_Point = BlzGetTriggerPlayerMousePosition()
-


Special Effect - Create a special effect at Point using Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
-


Special Effect - Destroy (Last created special effect)
-


Unit - Move (Triggering unit) instantly to Point
-


Custom script: call RemoveLocation(udg_Point)
-
-
I guess I must be using it wrong?
Because this doesn't work either:
-
Test 2
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to Blink 2
-
-

Actions
-


Custom script: set udg_X = BlzGetTriggerPlayerMouseX()
-


Custom script: set udg_Y = BlzGetTriggerPlayerMouseY()
-


Set VariableSet Point = (Point(X, Y))
-


Special Effect - Create a special effect at Point using Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
-


Special Effect - Destroy (Last created special effect)
-


Unit - Move (Triggering unit) instantly to Point
-


Custom script: call RemoveLocation(udg_Point)
-
-
Only when using it with a mouse detection system I can get it to work:
-
Detect Mouse
-

Events
-


Player - Player 1 (Red) issues Mouse Move event
-
-

Conditions
-

Actions
-


Set VariableSet PlayerMouse_X = (Mouse Position X for Triggered Mouse Event)
-


Set VariableSet PlayerMouse_Y = (Mouse Position Y for Triggered Mouse Event)
-
-
-
Test 3
-

Events
-


Unit - A unit Starts the effect of an ability
-
-

Conditions
-


(Ability being cast) Equal to Blink 3
-
-

Actions
-


Set VariableSet Point = (Point(PlayerMouse_X, PlayerMouse_Y))
-


Special Effect - Create a special effect at Point using Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
-


Special Effect - Destroy (Last created special effect)
-


Unit - Move (Triggering unit) instantly to Point
-


Custom script: call RemoveLocation(udg_Point)
-
-
So I guess it's an easy work-around to have a system save the X/Y of the mouse and just use that when you have to but I was wondering if there is a way to just get the X/Y only when needed.
I'm also afraid of performance issues when saving X/Y of all players when there is a mouse move because that's pretty much all the time when playing.



