Staredit Network > Forums > SC1 UMS Theory and Ideas > Topic: Detecting Keys Pressed (EUDs)
Detecting Keys Pressed (EUDs)
Feb 21 2009, 2:27 am
By: Morphling
Pages: < 1 « 3 4 5 6 7 >
 

Nov 18 2009, 9:26 pm Morphling Post #81



Quote from Wormer
Also, to display leaderboard you have to differentiate players by their slots somehow (for example by detecting starting screen positions). Only keypress detection is not sufficient.
What are you talking about? When a player presses "L" for example, then you could display leaderboard. If player one presses "L" then only player one will see the leaderboard.



None.

Nov 18 2009, 9:37 pm scwizard Post #82



That's neat.

I might add something like that to my HLS version. So that players can press F5, F6, F7, F8 to toggle between:
Leaderboard off
Kills
Elite kills
Hero kills



None.

Nov 18 2009, 11:55 pm rockz Post #83

ᴄʜᴇᴇsᴇ ɪᴛ!

The easiest way to prevent single player cheats is to play in multiplayer, unless you want to use the "pause game" feature.

You can't turn off the leaderboard once it's on (I don't think).



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

Nov 19 2009, 12:37 am scwizard Post #84



Quote from rockz
The easiest way to prevent single player cheats is to play in multiplayer, unless you want to use the "pause game" feature.

You can't turn off the leaderboard once it's on (I don't think).
Drat how annoying.



None.

Nov 19 2009, 1:09 am PearS Post #85



can anyone give a brief explanation of how this map actually works? I understand the eud thing that recognizes key strokes but how does all that translate into a moving unit



None.

Nov 19 2009, 1:53 am rockz Post #86

ᴄʜᴇᴇsᴇ ɪᴛ!

press "left" key.
Condition detects pressing "left" key, running action.
Action orders unit to move to the left, probably based on a mobile grid.

Note that moving units is an illegal action, and will desync, so that's single player only.



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

Nov 19 2009, 2:41 am Morphling Post #87



It's not a mobile grid. I used a location grid. When a player presses the "A" key I subtract one X coordinate from the unit and order it. The longer you hold it the farther and faster it goes. It slowly gains speed because of the halt distance. You can also press two keys at once going at an angle.



None.

Nov 19 2009, 3:49 am ImagoDeo Post #88



And it's on a 20x12 map, isn't it? That helps with the location gridding.



None.

Nov 19 2009, 10:51 am Wormer Post #89



Quote from Morphling
Quote from Wormer
Also, to display leaderboard you have to differentiate players by their slots somehow (for example by detecting starting screen positions). Only keypress detection is not sufficient.
What are you talking about? When a player presses "L" for example, then you could display leaderboard. If player one presses "L" then only player one will see the leaderboard.
Indeed. Sorry, I was wrong on this point.



Some.

Nov 23 2009, 7:35 pm ImagoDeo Post #90



All right, I have a few questions.

How long does the game store the memory of a key being pressed?
If it's instantaneous, or only lasts until the player stops holding the key down, it seems pretty useless. I was thinking of using EUD key detection to tell a player what spell he or she is about to cast, or perhaps use it for spell information by having them type out 'spell information,' or something like that. How would I go about checking for strings of characters? Does the memory last long enough to check that? Would it fail to work if you typed it too slowly?



None.

Nov 23 2009, 8:07 pm Heinermann Post #91

SDE, BWAPI owner, hacker.

As long as the key is held down, the condition is true. Detecting what someone types would be tedius. You would need to set a switch or use death counts for each letter they pressed (for each stage of the full sentence).




Nov 23 2009, 8:14 pm scwizard Post #92



Quote from Heinermann
As long as the key is held down, the condition is true. Detecting what someone types would be tedius. You would need to set a switch or use death counts for each letter they pressed (for each stage of the full sentence).
The values that correspond to the relevant keys have a well defined pattern. It probably wouldn't be so tedious to write a (python? marcrotrig?) script that would generate triggers that would detect what someone typed.



None.

Nov 26 2009, 6:19 pm samsizzle Post #93



Quote from scwizard
Quote from Heinermann
As long as the key is held down, the condition is true. Detecting what someone types would be tedius. You would need to set a switch or use death counts for each letter they pressed (for each stage of the full sentence).
The values that correspond to the relevant keys have a well defined pattern. It probably wouldn't be so tedious to write a (python? marcrotrig?) script that would generate triggers that would detect what someone typed.

I did this in one of my maps with the letters VIS and it would reveal the map. But it was quite tedious and it didn't work some of the time...



None.

Dec 4 2009, 2:13 am ImagoDeo Post #94



Question - Do the players named in the conditions have to be in-game for the EUD conditions to be fulfilled?



None.

Dec 4 2009, 2:36 am scwizard Post #95



No.



None.

Dec 14 2009, 1:01 am DavidJCobb Post #96



This may sound like a dumb question, but what version of StarCraft does this apply to? (As in, what patch, and normal or Brood War?) I'm trying to keep track of two keys (Enter and E) and have found that SC crashes when I load the map. I loaded it in SC1.05 with Brood War.

As for detecting sentences, I think I have a method involving keycodes and binary countoffs... This method could possibly work with multiple (pre-defined) sentences. I'm trying to script it now.



None.

Dec 14 2009, 1:13 am Morphling Post #97



It definitly works for the current version. (1.16.1) It crashes because the addresses are changed in the previous starcraft versions.



None.

Dec 14 2009, 3:03 am DavidJCobb Post #98



Ah, so I need to upgrade to the current version. Thanks :D


By the way, I finished my system for detecting sentences. I haven't triggered it yet, but it is quite the abomination! It would take about 36 DCs, two switches, and 682 triggers (not including the EUDs)!

The idea was to make a system where you could store a predefined string (converted into charcodes) into a set of 32 death counters, which essentially act as an array. The trigger system would simply watch for keypresses and keep track of where we are in the target string, and what charcode to watch for next.

I actually can't describe it in prose... I have a kind of weird JS-like pseudocode for it. It's long because it uses a LOT of binary countoffs to check for equality between death counters. (If there were some better way to check if two death counters are equal, that would likely make this system far more efficient and worthwhile to implement.)

So here it is, for anyone who wants to waste a few days triggering it. It's probably not worth the effort.

EDIT: Almost forgot: the charcodes are the death counts as listed here. The EUD triggers would just listen to those death counts, and set $$Keycode to equal the count. (We need another counter because you can't edit EUD death counters.)

Collapsable Box


Post has been edited 1 time(s), last time on Dec 14 2009, 3:07 am by DavidJCobb. Reason: Forgot to list the charcodes.



None.

Dec 24 2009, 2:06 am Sacrieur Post #99

Still Napping

So we can't use it for multiplayer because it only works for things that display for a single player?

Still, leader board and text displays are enough to get me excited. What about center view or minimap ping?



None.

Dec 24 2009, 3:45 am O)FaRTy1billion[MM] Post #100

👻 👾 👽 💪

http://www.staredit.net/wiki/EUDs#Extra_information



TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB - topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig - topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
\:farty\: This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!

Options
Pages: < 1 « 3 4 5 6 7 >
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[2024-4-27. : 7:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[2024-4-27. : 6:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
[2024-4-27. : 3:33 pm]
O)FaRTy1billion[MM] -- o sen is back
[2024-4-27. : 1:53 am]
Ultraviolet -- :lol:
[2024-4-26. : 6:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[2024-4-26. : 6:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[2024-4-26. : 6:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[2024-4-26. : 6:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[2024-4-26. : 6:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
Please log in to shout.


Members Online: C(a)HeK, Roy, RIVE, Ultraviolet