[skip all navigation]

Detecting Keys Pressed (EUDs), Took forever....

Pages: < 1 « 3 4 5 6 7 >
Creator: Morphling
Time: Feb 21 2009, 2:27 am

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

[Avatar]
offlinecontact
Rank: Regular
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.

Top

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

[Avatar]
offlinecontact
Rank: Regular
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

Top

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

[Avatar]
お や す み
offlinecontact
Rank: Veteran
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).

This is a great wallpaper to use if you want to go into an epileptic fit every time you sit down in front of your laptop, which I guess is a better option than watching Naruto.
Top

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

[Avatar]
offlinecontact
Rank: Regular
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.

Top

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

[Avatar]
offlinecontact
Rank: Member
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

Top

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

[Avatar]
お や す み
offlinecontact
Rank: Veteran
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.

This is a great wallpaper to use if you want to go into an epileptic fit every time you sit down in front of your laptop, which I guess is a better option than watching Naruto.
Top

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

[Avatar]
offlinecontact
Rank: Regular
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.

Top

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

[Avatar]
Back! Maybe.
offlinecontact
Rank: Regular
And it's on a 20x12 map, isn't it? That helps with the location gridding.

"We live, as we dream - alone..."
-Marlow, Heart of Darkness
Top

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

[Avatar]
offlinecontact
Rank: Regular
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.

Top

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

[Avatar]
Back! Maybe.
offlinecontact
Rank: Regular
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?

"We live, as we dream - alone..."
-Marlow, Heart of Darkness
Top

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

[Avatar]
BWAPI Project Owner
offlinecontact
Rank: Veteran
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).

Top

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

[Avatar]
offlinecontact
Rank: Regular
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.

Top

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

[Avatar]
offlinecontact
Rank: Regular
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...

(signature image)
Top

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

[Avatar]
Back! Maybe.
offlinecontact
Rank: Regular
Question - Do the players named in the conditions have to be in-game for the EUD conditions to be fulfilled?

"We live, as we dream - alone..."
-Marlow, Heart of Darkness
Top

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

[Avatar]
offlinecontact
Rank: Regular
No.

Top

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

[Avatar]
↑ STUDENT DRIVER ↑
offlinecontact
Rank: Regular
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.


░░░▒▒▒▓▓▓▓███▀▀░▄▄▄▄▄▄░▀▀███▓▓▓▓▒▒▒░░░
░░▒▒▒▓▓▓████░▄██████████▄░████▓▓▓▒▒▒░░
░▒▒▒▓▓▓████▐▀▀▀█████▀▀▀▀██▌████▓▓▓▒▒▒░
░▒▒▓▓▓████▐░██░░███▌██░░░██░████▓▓▓▒▒░
▒▒▒▓▓▓███▌▐░██▌░███▌███▌░██▌▐███▓▓▓▒▒▒
▒▒▓▓▓████▌██▄▄▄▄████▄▄▄▄▄███▐████▓▓▓▒▒
▒▒▓▓▓████▌██▀▀▀▀▀▀▀▀▀▀▀▀▀███▐████▓▓▓▒▒
▒▒▓▓▓████▌███▌▓▒▓▒▓▒▓▒▒▒▌███▐████▓▓▓▒▒
▒▒▒▓▓▓███▌▐██▌▒▓▒▓▒▒▒▒▒▒▌██▌▐███▓▓▓▒▒▒
░▒▒▓▓▓████░███▐▒▓▒█████▌███░████▓▓▓▒▒░
░▒▒▒▓▓▓████░▀██▄▀▀▀▀▀▀▄██▀░████▓▓▓▒▒▒░
░░▒▒▒▓▓▓████▄░▀▀██████▀▀░▄████▓▓▓▒▒▒░░
░░░▒▒▒▓▓▓▓█████▄▄▄▄▄▄▄▄█████▓▓▓▓▒▒▒░░░
Top

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

[Avatar]
offlinecontact
Rank: Regular
It definitly works for the current version. (1.16.1) It crashes because the addresses are changed in the previous starcraft versions.

Top

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

[Avatar]
↑ STUDENT DRIVER ↑
offlinecontact
Rank: Regular
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

This post was edited 1 time, last edit by DavidJCobb: Dec 14 2009, 3:07 am.  Reason given: Forgot to list the charcodes.


░░░▒▒▒▓▓▓▓███▀▀░▄▄▄▄▄▄░▀▀███▓▓▓▓▒▒▒░░░
░░▒▒▒▓▓▓████░▄██████████▄░████▓▓▓▒▒▒░░
░▒▒▒▓▓▓████▐▀▀▀█████▀▀▀▀██▌████▓▓▓▒▒▒░
░▒▒▓▓▓████▐░██░░███▌██░░░██░████▓▓▓▒▒░
▒▒▒▓▓▓███▌▐░██▌░███▌███▌░██▌▐███▓▓▓▒▒▒
▒▒▓▓▓████▌██▄▄▄▄████▄▄▄▄▄███▐████▓▓▓▒▒
▒▒▓▓▓████▌██▀▀▀▀▀▀▀▀▀▀▀▀▀███▐████▓▓▓▒▒
▒▒▓▓▓████▌███▌▓▒▓▒▓▒▓▒▒▒▌███▐████▓▓▓▒▒
▒▒▒▓▓▓███▌▐██▌▒▓▒▓▒▒▒▒▒▒▌██▌▐███▓▓▓▒▒▒
░▒▒▓▓▓████░███▐▒▓▒█████▌███░████▓▓▓▒▒░
░▒▒▒▓▓▓████░▀██▄▀▀▀▀▀▀▄██▀░████▓▓▓▒▒▒░
░░▒▒▒▓▓▓████▄░▀▀██████▀▀░▄████▓▓▓▒▒▒░░
░░░▒▒▒▓▓▓▓█████▄▄▄▄▄▄▄▄█████▓▓▓▓▒▒▒░░░
Top

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

[Avatar]
offlinecontact
Rank: Regular
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?

× ÷ ± · ∫ ƒ | ⅛ ¼ ⅓ ⅜ ½ ⅝ ⅔ ¾ ⅞ | π φ ∞ | ≡ ≈ ≥ ≤ ∴ ¬ ∩ Ø | √ ª ⁿ º ¹ ² ³ | ✓ ✗ | א
α β Γγ ∆∂ ε ζ η Θθ Ιι κ Λλ μ Ξξ Π ρ Σσς τ υ Φ Ψψ Ωω
(user posted image) (user posted image)
Top

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

[Avatar]
‮.rapsdleF
onlinecontact
Rank: Elite
http://www.staredit.net/wiki/EUDs#Extra_information

TinyMap2 - Latest in map compression! [ 8/26/12 - New build! Potentially fixed Win7 crash ]
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!
(user posted image) This page has been viewed (user posted image) times!
Top
0 members in this topic (italic members are currently writing a reply): None
+ guest(s)


[03:09 am]
Wing Zero -- fair enough
[03:08 am]
Wing Zero -- ...
[02:58 am]
Vrael -- cheese is still holy
[02:58 am]
Vrael -- and cheese
[02:57 am]
Wing Zero -- Man fucks are pretty much the only thing left in this world that are still holy.
[02:39 am]
Raitaki -- wat
[02:38 am]
lil-Inferno -- "Raitaki -- HOLY F" Gtfo stupid fundie
Please log in to shout.