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

The following guide was tested and verified with euddraft and EUD Editor2

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.

Hits: 3 Size: 51.59kb
Hits: 2 Size: 2.58kb
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?


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.

maintaining 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?

  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[09:44 pm]
Wing Zero -- :wob:
[02:09 pm]
lil-Inferno -- :wob:
[09:58 am]
UndeadStar -- :wob:
[2021-10-19. : 4:53 am]
Ultraviolet -- :wob:
[2021-10-18. : 10:12 pm]
RIVE -- :wob:
[2021-10-18. : 10:09 pm]
Vrael -- :wob:
[2021-10-18. : 9:29 am]
Zycorax -- :wob:
[2021-10-18. : 4:55 am]
MTiger156 -- :wob: Wob o'clock
[2021-10-18. : 4:23 am]
jjf28 -- :wob::wob:::wob::wob:
[2021-10-17. : 7:14 pm]
NudeRaider -- :wob: :wob: :wob:, :wob: around the clock!
Please log in to shout.

Members Online: Hartungtrfid, Roy