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: 4 Size: 51.59kb
WASD_Config.e2s
Hits: 2 Size: 2.58kb
WASD_Demo_Compiled.scx
Hits: 2 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

Armoha

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.



maintainer of euddraft and eudplib.
Armo#6637 at Discord :teehee:

Sep 12 2020, 6:49 am Oh_Man Post #6

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

Is there any way to make it so you can hold the button down to be continually setting the DC to 1, then letting go of the button sets the DC to 0?




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
[2024-4-20. : 8:09 pm]
Vrael -- woo baby talk about a time crunch
[2024-4-20. : 8:08 pm]
Vrael -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
so that gives me approximately 27 more years to finish tenebrous before you get to it?
[2024-4-20. : 7:56 pm]
Oh_Man -- lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
Please log in to shout.


Members Online: Roy, bransonesoto, Ahonial74, derrickecannon