Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Detect which player said text
Detect which player said text
Aug 5 2012, 11:13 pm
By: Kaias  

Aug 5 2012, 11:13 pm Kaias Post #1



I need a way to detect which player (Player 1, Player 2 etc) wrote the most recent line of displayed text. Since player 1's name is always red and player 2's name is always blue, I'm guessing that I should be possible to detect with EUDs which player sent a message based on the color code. Obviously this has to be a shared EUD.



None.

Aug 5 2012, 11:21 pm Roy Post #2

An artist's depiction of an Extended Unit Death

There is no color character in front of the player's name, so you can't figure it out based on that. Doing a string comparison with the name in the player struct obviously is beyond ideal, so I don't think there's a way to do this.




Aug 11 2012, 9:29 am staxx Post #3



What about running individual triggers to detect which player opened their chat box and closed it using different switches/DC's for each player.



None.

Aug 11 2012, 9:38 am Roy Post #4

An artist's depiction of an Extended Unit Death

He said he needs to use shared EUDs (i.e., EUDs that will work for multiplayer), not local ones. The chat box is local.




Aug 11 2012, 11:50 am Azrael Post #5



You have two realistic approaches to take.

1) Name string comparison.

Using numerical ranges, you compare the name of a player with the name of the person who wrote the text. When the map starts, you could have a phase in which you check various factors for each name (string value, string length) utilizing ranges of values, and store the result as a death count. For each message made after that, you could do the same thing with the name of the person who wrote it, and then compare the two death count values.

2) Unique identifying text.

Require each player to begin the line of text with a character or string unique to them (such as a hyphen followed by their player number). Desync anyone who uses another player's ID. This could be made to ignore any lines written just before someone drops from the game.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2026-7-18. : 2:27 am]
Symmetry -- https://staredit.net/topic/18903/ THE REVIEWS ARE HERE! "ok these are pretty good memes" - ssj9Kevin
[2026-7-17. : 2:58 pm]
Ultraviolet -- Symmetry
Symmetry shouted: Man I wish we had this tech back in the day when people played ums lmao
fr fr
[2026-7-17. : 2:39 am]
Symmetry -- Man I wish we had this tech back in the day when people played ums lmao
[2026-7-16. : 6:28 am]
NudeRaider -- EUD actions, specifically. The conditions remained. Today we can even have actions again, but they're all virtualized/whitelisted (not sure on the actual technical implementation) so you can only use them for specific intended purposed, not arbitrary code injections.
[2026-7-16. : 6:26 am]
NudeRaider -- I mean yes, maps - through EUDs - were theoretically able to do that as well, but that was patched quickly.
[2026-7-16. : 6:25 am]
NudeRaider -- Symmetry
Symmetry shouted: Ohhh imagine a SC map that could delete itself
not the map, the editor
[2026-7-16. : 2:28 am]
Symmetry -- I vaguely remember Voy doing some ACE back in the day, but I had no idea EUDs could do that kind of shit. I am very much catching up on the technology
[2026-7-16. : 2:28 am]
Symmetry -- Ohhh imagine a SC map that could delete itself
[2026-7-15. : 8:51 pm]
NudeRaider -- Symmetry
Symmetry shouted: NudeRaider Is EUD editor capable of writing shit onto the player's harddrive? That seems like it would be dangerous
yeah an editor that isn't allowed to write files sounds rather pointless, so I'd assume it can. Like most other programs too btw. and yes, obviously that's dangerous, but also kinda necessary. MS introduced that virtualization for exactly that reason.
[2026-7-15. : 4:10 am]
Ultraviolet -- I don't think so. I think they shut that shit down after 1.16, maybe even earlier
Please log in to shout.


Members Online: Excalibur