Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: EUD Mouse location
EUD Mouse location
This topic is locked. You can no longer write replies here.
Mar 18 2010, 11:38 pm
By: poison_us  

Mar 18 2010, 11:38 pm poison_us Post #1

Master has given Dobby a doctorate! Dobby is free!

Alright, this is what I got from Farty's EUD database:

X-Position Address: 006CDDAC Size: 4
Y-Position Address: 006CDDB0 Size: 4

I omitted all of the obvious stuff, such as version, platform, and the description is useless. How do I find the position of the mouse? I don't know what the address means, and I kinda need stuff like this soon. It's for my attempt at the Fire contest.





Mar 19 2010, 12:06 am Apos Post #2

I order you to forgive yourself!

Just in case this helps: http://www.staredit.net/topic/9797/




Mar 19 2010, 12:14 am poison_us Post #3

Master has given Dobby a doctorate! Dobby is free!

It's better than nothing, thanks. I'll make due with this until I can get better. Who knows...maybe I can reverse trigger it and find out how to find the pixel that the mouse is on. I was thinking something like two sets of "at least" to specify the mouse has to be to the right and below a certain pixel, and then another set of "at most" so that it has its bounds. Maybe I can do something with this.

Thanks again.

EDIT: After looking at it, it seems too in-depth. I don't need nearly that many locations; my idea was to combine keypress detection with mouse location detection to produce building information for the current player.


Post has been edited 1 time(s), last time on Mar 19 2010, 12:25 am by poison_us.




Mar 19 2010, 12:36 am Apos Post #4

I order you to forgive yourself!

I just opened that map again and what I can understand is that it gets the X and Y coordinate of the window then adds the X and Y coordinates to their corresponding death counters. (The X and Y coordinates of the mouse are relative to the window. You can be anywhere on the map and if your mouse is on the top left corner, it will be 0,0 still.) Once that is done, there is a grid system that moves the locations relatively close to the perfect mouse location.

In your map, if you know where the mouse should be, you can do a similar system but with a fixed location. (Or none at all depending on what you want to do.)




Mar 19 2010, 12:49 am poison_us Post #5

Master has given Dobby a doctorate! Dobby is free!

Yeah, I figured out that it uses 3456 unique x- and y-coordinate screen locations (divides into 27 per grid...that's what was throwing me off), one of 639 mouse x-coordinates, and then one of 479 mouse y-coordinates. I figure I aught to keep the mouse coordinates, and then delete any trigger with a screen position greater than 2592 (3456 / 128 = 27, 27 * 96 = 2592). That should reduce the trigger count and the location count (at least a little), while still giving the same results as the full-sized map you have above.

EDIT: Actually, I need to delete Cantina (x-coordinate) triggers greater than 3231, and Cave (y-coordinate) triggers greater than 3071.

EDIT2: Just did the above stuffs, and it broke the map. More to come. As a sidenote, I really don't need pixel detection, but tile detection. I just thought maybe pixel would be easier.


Post has been edited 2 time(s), last time on Mar 19 2010, 1:05 am by poison_us.




Mar 19 2010, 1:59 am rockz Post #6

ᴄʜᴇᴇsᴇ ɪᴛ!

Is there any particular reason this is in T&I, or should I move it to MMA? It kinda sounds like you're asking for help, and this is nothing really new...



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Mar 19 2010, 7:08 pm Cinolt Post #7



If all you want to do is detect when the mouse is over a unit and you know the unit's coordinates, then you don't need the grid triggers at all, and you'd need 0 locations. The map has the least amount of triggers needed for pixel accurate mouse location, so you shouldn't delete any triggers, except for the grid triggers which are an application of the mouse location system. To detect when a mouse is over a unit you'd make a trigger after the screen/mouse triggers that runs when _posX and _posY are the same or near the unit's coordinates.

Reducing accuracy in this case would require a lot more work because you have to adjust the conditions to At Least/At Most, essentially re-triggering most of it, and I would imagine trigger count isn't an issue so it's probably unnecessary.

Post has been edited 1 time(s), last time on Mar 19 2010, 7:21 pm by yoonkwun.



None.

Mar 19 2010, 9:48 pm poison_us Post #8

Master has given Dobby a doctorate! Dobby is free!

Quote from rockz
Is there any particular reason this is in T&I, or should I move it to MMA? It kinda sounds like you're asking for help, and this is nothing really new...
Yeah, my bad. I wasn't exactly thinking very well last night. I realized that it should be moved this morning when I was taking a shower...

Anyways, I can't figure out how the screen and pixel locations correspond to in-game coordinates. That's the main problem as of right now.





Mar 19 2010, 10:12 pm Cinolt Post #9



If you select a unit in SCMDraft 2 and hit enter it'll give you the "in-game coordinates", if that's what you mean. If your mouse in-game was ontop of a marine that was on (100,100), _posX would be 100 and _posY would be 100. That's all you really need to know.



None.

Mar 20 2010, 5:26 pm poison_us Post #10

Master has given Dobby a doctorate! Dobby is free!

Yes, but do I have to have all of the screen EUDs?




Mar 20 2010, 7:00 pm Cinolt Post #11



If you want to detect mouse location anywhere on a 128x128 map, yeah.

Maximum X coordinate on a 128x128 is 4096, and the X length of the window is 640, so 4096 - 640 = 3456, which is your maximum screenX trigger.
Maximum Y coordinate is 4200 because of the HUD, Y length of the window is 480, so 4200 - 480 = 3720, which is your maximum screenY trigger.

And since screen position is always locked on a 1/4 tile grid, you only need to have triggers in intervals of 8.

Post has been edited 1 time(s), last time on Mar 20 2010, 7:09 pm by yoonkwun.



None.

Mar 21 2010, 4:34 pm poison_us Post #12

Master has given Dobby a doctorate! Dobby is free!

Alright, thanks, I can work off of this. Can a mod lock?

Post has been edited 1 time(s), last time on Mar 21 2010, 4:52 pm by poison_us.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[03:57 am]
NudeRaider -- https://staredit.net/381600/ You have 5 minutes, then you can only edit your posts.
[04:05 pm]
NudeRaider -- DarkenedFantasies
DarkenedFantasies shouted: you eat lots of beans
:lol:
[11:30 am]
NudeRaider -- I would like 3000 minerals, please
[2026-4-16. : 7:32 pm]
Zoan -- I got $2000 bonus. I would like 2000 minerals, please
[2026-4-16. : 4:15 am]
DarkenedFantasies -- you eat lots of beans
[2026-4-16. : 3:46 am]
IskatuMesk -- how do i get gas
[2026-4-15. : 11:43 pm]
Moose -- you don't
[2026-4-15. : 10:06 pm]
Zoan -- how do i get minerals
[2026-4-14. : 11:45 pm]
ClansAreForGays -- Anyone wanna played Skewed StarCraft?
[2026-4-14. : 12:07 am]
Vrael -- NudeRaider
NudeRaider shouted: Vrael ranting still is though
you're a gentleman and a scholar, thank you
Please log in to shout.


Members Online: RIVE, jun3hong