So this is in regaurds to another post I have but its not going in the direction I need it to go AND I'm attempting to apply a solution that I do not understand how it works.
Instead I will ask this.
I am using the tile-movement behavior. I like the way it works, and it will work for the project that I am attempting to make.
I remapped the arrow keys to the wsad keys.
I am now attempting to do the very same thing that the arrow/WSAD keys do but with a mouse click.
I think that I need to first get the mouse position in relation to the sprite, OR the mouse position in relation to the image point on the sprite.
After that I need to calculate or store that position.
If that position is 0 to 90 degrees in relation to the sprite when clicked, then I want simulate the tile-movement behavior to go up. 91 to 180, move to the right..so on and so forth.
So...how do I find the mouse position so I can start working this out?
I would assume that I would have to use a local or global varible to first store the mouse position, but I'm not sure how to actually get the position.
This is what I have so far.:
Where do I go from here, and am I close?