Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: triggers to detect leaving players
triggers to detect leaving players
This topic is locked. You can no longer write replies here.
Apr 25 2010, 6:47 pm
By: UED_Hexy  

Apr 25 2010, 6:47 pm UED_Hexy Post #1



I want to destroy all of a player's units when he leaves. Here is what I have:

All triggers are ticked for All Players.

CONDITIONS:
Always
Current Player commands at least 1 [any unit].
ACTIONS:
Modify death counts for Current Player: Set to 1 for Cave.
Preserve trigger.

CONDITIONS:
Player 1 has suffered at most 0 deaths of Cave.
ACTIONS:
Kill all [any unit] for Player 1.

etc. for the other seven players

CONDITIONS:
Always
ACTIONS:
Modify death counts for Player 1: Set to 0 for Cave.
Modify death counts for Player 2: Set to 0 for Cave.
Modify death counts for Player 3: Set to 0 for Cave.
Modify death counts for Player 4: Set to 0 for Cave.
Modify death counts for Player 5: Set to 0 for Cave.
Modify death counts for Player 6: Set to 0 for Cave.
Modify death counts for Player 7: Set to 0 for Cave.
Modify death counts for Player 8: Set to 0 for Cave.
Preserve trigger.

But everyone has their units destroyed immediately after the game starts. Anyone know what's up with this?



None.

Apr 25 2010, 6:55 pm Cinolt Post #2



When a player leaves his units are given to player 12. So the best solution is to always kill all units for player 12 (neutral).



None.

Apr 25 2010, 8:16 pm NudeRaider Post #3

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

What yoonkwun said.

Also keep in mind that the death counts of leavers are not set to 0 so this method won't detect leavers.
If you need to know the player number of a leaver just check for controls at most 0 [any unit].
If players can have 0 units at a point in the game while still being alive/present it gets a little complicated.
Ideally you let every player set his own dc to 1 and then player 8 (must be computer so he's always there) clears it. And when you detect a player with 0 dcs then you know he isn't there because absent players can't set their own dcs.
If you can't have a computer at slot 8 it gets even more complicated. Just ask if that's the case and give your exact setup.




Apr 25 2010, 8:33 pm UED_Hexy Post #4



It's a phantom map with up to 8 humans. I need to know when the phantom leaves so the other players can win. The phantom has a dc of 1 for a unit. So could I check if a player has dc 1 for that unit and controls 0 units at anywhere and then cause victory for everyone else? Or would the trigger not run because he has left the game?



None.

Apr 25 2010, 9:15 pm NudeRaider Post #5

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

All Players
Conditions:
Player 1 suffered 1 dc
Player 1 controls 0 [buildings]
Actions:
Win

Copy 8 times and replace Player 1 with each player.




Apr 29 2010, 8:41 am TheKeyToKilling Post #6



Yes, Currently Player Commands 0 Any Unit... Current Player Deaths = 1... blah blah blah works fine... For future info if ur making a map and u dont want to kill every unit when a player leaves... using kill all *specific unit* for p12 preserve trigger works good too :)



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[02:58 pm]
Ultraviolet -- Symmetry
Symmetry shouted: Man I wish we had this tech back in the day when people played ums lmao
fr fr
[02: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
[2026-7-15. : 2:19 am]
Symmetry -- NudeRaider
NudeRaider shouted: Symmetry I can't tell if it's relevant. You provided literally no context so I was providing an equally generic answer.
Is EUD editor capable of writing shit onto the player's harddrive? That seems like it would be dangerous
Please log in to shout.


Members Online: Heinermann, Ultraviolet