Wiesi
April 1, 2020, 8:08am
#1
I have a simple problem. I want a crosshair to follow the mouse pointer, but for some reason it doesn’t work.
So i created an object named “crosshair” and i put it on the scene. Then i added an action:
Change the position of Crosshair set to Mouse.X() (x axis), set to Mouse.Y() (y axis)
But when i start the “game” nothing happens, the crosshair doesn’t move. Any Suggestions what i did wrong?
Ruhan
April 1, 2020, 8:54am
#2
Did you added the cursor in the view port? Because to run this event you need to place the cursor sprite in the scene.
Wiesi
April 1, 2020, 9:08am
#3
Yes, like i wrote, i put it on the scene.
Ruhan
April 1, 2020, 9:10am
#4
Well add condition named “Always”
Wiesi
April 1, 2020, 9:11am
#5
That unfortunately didn’t do anything.
Wiesi
April 1, 2020, 9:14am
#6
I uploaded the file here: File-Upload.net - Datei nicht gefunden
Does it work for you?
Ruhan
April 1, 2020, 9:18am
#7
Bouh
April 1, 2020, 12:31pm
#8
You use the wrong expressions for Mouse.
You should use
MouseX("", )
Double quotes and comma are important in this expression. When you are stuck on this prefer use the sigma button for open the expression list and search “Mouse”.
Wiesi
April 1, 2020, 12:45pm
#9
Ahh that works!! Thanks A LOT!! <3
1 Like
Wiesi
April 1, 2020, 12:46pm
#10
I see! Thanks alot for clearing that up!!