Sorry nvm
Forum rules
This is a sub-forum for things specific to MicroMacro.
This is not the place to ask questions about the RoM bot, which uses MicroMacro. There is a difference.
This is a sub-forum for things specific to MicroMacro.
This is not the place to ask questions about the RoM bot, which uses MicroMacro. There is a difference.
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Mouse position calculation problem
Code: Select all
x = (desX / 800) * 8.95429; -- should work
Re: Mouse position calculation problem
That doesn't work because I'm turning mouse coords into ingame coords.
What i was doing is taking my current position - my destination which could be -6 through 6. If it's -4 it's would find the values needed to move my mouse to the coords -4 of my current x position.
Edit: Whats really got me confused right now is the values the mouse is using.
X: 0 - 8.95429718703558E-43
Y: 0 - 1.11671963328117E-37
Y goes from 9.9xxxxxxxxx-38 to 1.11671963328117E-37
I have no idea how to add in he E-37 calculation. I'm not that good at math.. -.-
What i was doing is taking my current position - my destination which could be -6 through 6. If it's -4 it's would find the values needed to move my mouse to the coords -4 of my current x position.
Edit: Whats really got me confused right now is the values the mouse is using.
X: 0 - 8.95429718703558E-43
Y: 0 - 1.11671963328117E-37
Y goes from 9.9xxxxxxxxx-38 to 1.11671963328117E-37
I have no idea how to add in he E-37 calculation. I'm not that good at math.. -.-
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Mouse position calculation problem
Then reverse what I wrote. You aren't providing ample information for me to have any idea what you're looking for.Exempt wrote:That doesn't work because I'm turning mouse coords into ingame coords.
You don't. Don't worry about it. You really don't need that kind of accuracy.I have no idea how to add in he E-37 calculation. I'm not that good at math.. -.-
Re: Mouse position calculation problem
I will try it reversed, I'm not sure what that will do.
All I'm trying to do is move the mouse in sync with the in game coords
The in game coords are like xxx, yyy. If i click myself in the game i can move around 5 step on the in game coord system so if i wanted to walk 5 steps to the left of 555, I would need to walk to 560. The mouse coords use the floats i said in the last post.
Um... 555 would be the center is the screen (my player position).
What other info should i post?
All I'm trying to do is move the mouse in sync with the in game coords
The in game coords are like xxx, yyy. If i click myself in the game i can move around 5 step on the in game coord system so if i wanted to walk 5 steps to the left of 555, I would need to walk to 560. The mouse coords use the floats i said in the last post.
Um... 555 would be the center is the screen (my player position).
What other info should i post?
- 3cmSailorfuku
- Posts: 354
- Joined: Mon Jan 21, 2008 6:25 pm
Re: Mouse position calculation problem
What he did was using a positive multiplicator (To rewrite the values to your wanted value),Exempt wrote:I will try it reversed, I'm not sure what that will do.
now you just multiplicate it with a negative value to get a lesser value of your source.
Basically he originally wrote a calculation to calculate ingame coords to screen coords, you just use a negative number. (That only works though if the screen resolution is bigger than the value you get ingame)
Re: Mouse position calculation problem
Yes but it doesn't even come close to moving the mouse where it should be.
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Mouse position calculation problem
Why would 555 be the center of the screen? I thought the game was 800*600. The closest resolution to what you are saying would be 1024*768, with 512 being half the width. Is that what you mean?
In this case, if you wanted to position the mouse in the center of the screen, (512 / 1024)*8.954297 = 4.477. If you write this value to memory, it should position it in the center. What happens?
In this case, if you wanted to position the mouse in the center of the screen, (512 / 1024)*8.954297 = 4.477. If you write this value to memory, it should position it in the center. What happens?
Re: Mouse position calculation problem
555 being the center of the ingame screen, where my character is standing.
there is both ingame coords and mouse coords here.
there is both ingame coords and mouse coords here.
Re: Mouse position calculation problem
Holy cow, I hate the maker of this game. I had an issue before with the coords because i searched 4byte for the mouse coords and it was a float. Guess what...now the mouse coords are stored as 4byte. I have it working again using the 4byte values and write to a int -.-. Thanks a bunch for the help.
Who is online
Users browsing this forum: No registered users and 7 guests