Staredit Network > Forums > SC1 UMS Theory and Ideas > Topic: [EUD] Multiplayer Key Press Detection
[EUD] Multiplayer Key Press Detection
Feb 3 2019, 10:05 pm
By: Roy  

Feb 3 2019, 10:05 pm Roy Post #1

An artist's depiction of an Extended Unit Death

If you've read Section 5 of [EUD] A Mapmaker's Guide for Creating EUDs, you would know there are a lot of cool things we can do with EUDs, but some of them cause synchronization issues in multiplayer. One such feature is detecting keys pressed on a keyboard, which could be used for anything from custom menus to creating units.



Well, thanks to the MurakamiShiinaQC plugin available in EUD Editor 2, it is now possible to use such features in multiplayer games without desyncing.

Key Detection on Multiplayer

Prerequisites:
The following guide was tested and verified with euddraft 0.8.2.9 and EUD Editor2 0.17.8.2.

Bind Key Press to Unit Death Counter

Step 1:
With your map open in EUD Editor 2, click on the "Plugins" button



Step 2:
Enable the "MurakamiShiinaQC" plugin



Step 3:
(It is fine to leave the recognition unit as-is; it does not appear to be affected by actual in-game events like creating/killing the unit in question.)
Click on the "Insert" button that appears



Step 4:
Select the key you would like to capture (for example, 'W'), the unit to hold the death counter for it (for example, 'Goliath Turret'), and the value of the death counter when the key is pressed (for example, 1)


*Example: 'W' key is pressed = Death Counter 1 for Goliath Turret // 'W' key is not pressed = Death Counter 0 for Goliath Turret

After Completion it will look similar to:



Step 5:
Repeat steps 3 & 4 for each key you want to detect. Use a different death counter if you need the keys to work simultaneously (e.g., holding 'W' and 'D' to move up-right)



Key press capturing has now been set, and you can detect these by using the corresponding condition (from the example, "Player 1 has suffered exactly 1 deaths of Goliath Turret" means Player 1 is holding down the 'W' key)

Step 6:
Check the eudTurbo option, which will function like hyper triggers. (I'm not sure if this is absolutely necessary for key press detection, but it's a good thing to have selected regardless.)



Step 7:
Close the window and click the "Insert" button to compile the key press plugin into your map



That's it! Attached is a demo of being able to control units with the WASD keys. WASD_Demo.scx is the source map, WASD_Config.e2s is a loadable EUD Editor 2 settings file with the steps above followed and saved, and WASD_Demo_Compiled.scx is the resulting functional demo allowing players to move their Terran Marine around with the WASD keys.

Attachments:
WASD_Demo.scx
Hits: 2 Size: 51.59kb
WASD_Config.e2s
Hits: 1 Size: 2.58kb
WASD_Demo_Compiled.scx
Hits: 1 Size: 196.53kb

Post has been edited 2 time(s), last time on Feb 9 2019, 4:12 pm by Roy.




Feb 4 2019, 7:30 am NudeRaider Post #2

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

Okay, who is going to make the first (proper) 3rd person shooter for bnet?




Feb 4 2019, 11:53 am Oh_Man Post #3

Find Me On Discord (Brood War UMS Community & Staredit Network)

How can you have a third person shooter it HAS to be top down.




Feb 13 2019, 1:09 pm Swampfox Post #4



Hey thanks for this. Any insight into what the MouseLocationSet does in the plugin?



None.

May 20 2019, 10:56 am Arta(M) Post #5

wut's tis

Quote from Swampfox
Hey thanks for this. Any insight into what the MouseLocationSet does in the plugin?
You need to fill all 8 Locations to enable MouseLocation feature. 1st location follows position of 1st human player mouse cursor (it says P1 but it doesn't).
2nd location follows mouse cursor position of 2nd human player, and so on.



Armo#6637 at Discord :teehee:

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[09:30 pm]
NudeRaider -- modding is the only true religion. if you're not doing it you're doing it wrong
[09:28 pm]
NudeRaider -- Pr0nogo
Pr0nogo shouted: u
nice nice. Now try this one: v
[09:27 pm]
Pandut -- jaysus modding is hard when you havent done it in like 7 years
[09:12 pm]
Wing Zero -- If theyre frozen like this ya'll might as well try to open ever box
[09:11 pm]
Wing Zero -- Aaah magic boxes pls
[08:58 pm]
Pr0nogo -- u
[04:07 pm]
NudeRaider -- Pr0nogo
Pr0nogo shouted: what are those strange letters in front of u?
they're part of the alphabet, just like the u. But don't worry, no shame in not knowing. Even in developed countries we have programs dedicated to teach reading and writing because even here it happens.
[02:31 pm]
TF- -- Anitoch
[02:00 pm]
Dem0n -- where discord at lmao
[01:58 pm]
Pr0nogo -- what are those strange letters in front of u?
Please log in to shout.


Members Online: Roy, lil-Inferno, T-warp, Pandut