Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Some buildings Hidden when player leaves
Some buildings Hidden when player leaves
Oct 21 2009, 7:14 pm
By: PIESOFTHENORTH  

Oct 23 2009, 12:20 am PIESOFTHENORTH Post #21



well in this map there's only really one unit per player, the rest are buildings, so, it would still go to player 1 regardless because usually you're at the left of those buildings.

But it's not really necessary, i was just wondering.



None.

Oct 23 2009, 12:57 pm NudeRaider Post #22

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

Use death count randomization:
Always let a death counter run from 1 to # of players in force 1. Use a computer player's count and let him run the trigger.
If the (computer's) dc is 0 (when neutral owns a unit) set P1's dc (count of the same dc) to 1.
If the dc is 1 set P2's dc to 1.
If the dc is 2 set P3's dc to 1.
... for all players in force 1.

Then use this trigger:
Force 1
Conditions:
Current Player has suffered at least 1 death of dc
Actions:
Give all [any unit] at anywhere of neutral to Current Player
Set dc of Current Player to 0
Preserve trigger

Grey parts are changed compared to my 1st trigger without randomization.

The trick with this is if the randomization hits a player that has already left the game this ghost player will get his dc set, but as he can't run triggers he won't "grab" the units from P12. Next trigger loop the next player in line will get his dc set, until it hits an active one. This player then runs the trigger and the dc setting trigger will stop firing because P12 has no units anymore.

Only drawback: Players whose player number is just 1 greater than a leaver's player number have their chances to get the units improved.
If you wanted to avoid that you'd have to make a trigger that detects if an inactive player's (ex. owns no units) number matches the dc when P12 has no units. Then randomize a set of switches (2 switches for 3-4 players, 3 switches for more) until the binary number they create doesn't match the player number of a leaver and then set this player's dc.
Overkill if you ask me, but if necessary I'll explain in more detail.




Oct 24 2009, 12:00 am PIESOFTHENORTH Post #23



yeah.... that seems like more trouble than it's worth.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:47 am]
NudeRaider -- lil-Inferno
lil-Inferno shouted: nah
strong
[05:41 am]
Ultraviolet -- 🤔 so inf is in you?
[04:57 am]
O)FaRTy1billion[MM] -- my name is mud
[04:35 am]
Ultraviolet -- mud, meet my friend, the stick
[10:07 pm]
lil-Inferno -- nah
[08:36 pm]
Ultraviolet -- Inf, we've got a job for you. ASUS has been very naughty and we need our lil guy to go do their mom's to teach them if they fuck around, they gon' find out
[05:25 pm]
NudeRaider -- there he is, right on time! Go UV! :D
[05:24 pm]
lil-Inferno -- poopoo
[05:14 pm]
UndeadStar -- I wonder if that's what happened to me. A returned product (screen) was "officially lost" for a while before being found and refunded. Maybe it would have remained "lost" if I didn't communicate?
[03:36 pm]
NudeRaider -- :lol:
Please log in to shout.


Members Online: Roy, 6alicee451yr9, Moose, 1oliviac811go7, Oh_Man