Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: [SOLVED] Mouse Detection
[SOLVED] Mouse Detection
This topic is locked. You can no longer write replies here.
May 6 2012, 9:06 pm
By: Mouse  

May 6 2012, 9:06 pm Mouse Post #1



Hey guys. I was wondering if there was a way to make an EUD map that detects where your Mouse left clicks. Or right clicks.. But I wanted to make a map that is a 3rd person shooter and WASD is to move and the screen is constantly centered on your unit. Then wherever you left click, it would have to be a location the size of the marine's vision so that you can't cheat and just attack in fog of war. I know there is a game called Mouse Defense that detects where your mouse is detected, but I don't think this would help in this situation. Please help and thanks in advance!
~Mouse



None.

May 6 2012, 9:34 pm Chia-Tyrant Post #2



This thread can be useful.

According to it, you could use:
Quote
0x59CD00 19047 ORDER COORDINATE: Exactly x + 65536*y
to detect where you right click (once your marine is selected, of course). However, you would need a lot of triggers depending on the map's dimensions. Ideally, try making the playing field as small as possible in terms of height (the y dimension).

If you don't mind making it for single player only or requiring a 3rd party application, then you could use the following to detect your mouse's position:
Quote
0x6CDDC4 331416 MOUSE X COORDINATE: (Relative to screen) Exactly x
0x6CDDC8 331417 MOUSE Y COORDINATE: (Relative to screen) Exactly y
and use this to detect when you left click:
Quote
0x5968AC 12626 LEFT CLICK: AtLeast 1

As you probably know the second number is what you'll input in the first slot of scmdraft's "memory" condition. For instance, if you want to detect when your mouse is over the coordinates (10,20), you'd write the following trigger:

Trigger
Players
  • Any player
  • Conditions

  • Memory at Death Table +331416 is exactly 10
  • Memory at Death Table +331417 is exactly 20
  • Actions
  • Any action


  • As for detecting when the WASD keys are pressed, they're also listed in the thread I posted at the beginning. Works the same way and is also not shared.



    None.

    May 7 2012, 8:13 pm Mouse Post #3



    Cool, I'll try this out! Thanks for the great explanations!



    None.

    May 23 2012, 1:56 am jjf28 Post #4

    Cartography Artisan

    Getting Order Coordinates (air units)

    Worked the theory end of this out, though implementation will take some time. This provides a possible option for multiplayer - your "gun" would likely have to be a separate air unit fixed at some corner of the map and it would be right click only.

    ~ Thanks for the inspiration!



    TheNitesWhoSay - Clan Aura - github

    Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [12:32 pm]
    Oh_Man -- yea APM vs eAPM
    [08:48 am]
    NimoStar -- plus most of the human APM is just spam clicking APM inflation
    [08:47 am]
    NimoStar -- the thing with the "*12" thing is completely misleading. The AI isn't using two control groups, it can use each of those actions to command a single unit individually and issue different commands to each single unit.
    [08:06 am]
    NudeRaider -- NudeRaider
    NudeRaider shouted: Oh_Man Artosis hasn't caught on how devastating the perfect focus fire is. With the mutas he was like "the Mutas always seem to have less hp than against a human". But he didn't notice that the flock he had selected always just had one muta that was hurt. Same with the wraiths here. He's talking about how valks+wraith is gonna destroy Pluto's valks, then 5s later he's dumbfounded the human player's air is just gone and he never figured out why. And for some reason didn't even think to go back and look at the battle.
    *Pluto's wraiths
    [08:05 am]
    NudeRaider -- Oh_Man Artosis hasn't caught on how devastating the perfect focus fire is. With the mutas he was like "the Mutas always seem to have less hp than against a human". But he didn't notice that the flock he had selected always just had one muta that was hurt. Same with the wraiths here. He's talking about how valks+wraith is gonna destroy Pluto's valks, then 5s later he's dumbfounded the human player's air is just gone and he never figured out why. And for some reason didn't even think to go back and look at the battle.
    [02:18 am]
    Oh_Man -- Close enuf
    [2026-9-21. : 4:14 pm]
    Vrael -- perhaps there is a small professional player trapped in a box in the server rack where pluto is running? hmm?
    [2026-9-21. : 4:14 pm]
    Vrael -- 240*12*2 is 5760, where is the other 240 APM?
    [2026-9-21. : 3:44 pm]
    Oh_Man -- 1 action is selecting the unit and another action is moving it
    [2026-9-21. : 2:58 pm]
    Vrael -- 240*12 is 2880, where is the other 3000 APM?
    Please log in to shout.


    Members Online: body no, Moose, Darumju