HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Making players who disconnect automatically share unit control... ?

09-23-2003, 09:15 PM#1
Dalten
Anyone know how this is done? I guess standard melee maps do this by default and when I look at a default map I dont see anything that seems to make sense that would cause it to happen.

Right now my RPG if someone leaves or gets disconnected their char is basically useless and it makes it harder to continue.

Any help is appreciated.
09-23-2003, 09:20 PM#2
Ligature
When you've found out which player is disconnected you can run a trigger

Pick all units in (units owned by [disconnected player])
Unit - change owner of (picked unit) to Player X

you can also change their color using this group-pick all...

is this all you were asking?
09-23-2003, 09:42 PM#3
Dalten
Close, but more like a standard Bnet game.

Like if your playing a standard 2 vs 2 battlenet game and your partner gets disconnected, it automatically gives you control of his units.

I've tried setting up a trigger like your describing Ligature but I haven't found an event that would let the game auto detect which player left.
09-24-2003, 12:48 AM#4
jardragon901
Are you using UMSWE, it has a trigger to do that.
09-24-2003, 01:16 AM#5
malleus
Here is a trigger that works, complete without any UMSW or JASS needed - just plain and simple WE Trigger.

The only thing you need is a Boolean Array (called "left" here) of size 12 with all values initially set to false.


Trigger:
leavers
Events
Time - Every 10.00 seconds of game time
Conditions
Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Picked player) slot status) Equal to Has left the game
left[(Player number of (Picked player))] Equal to False
Then - Actions
Game - Grant shared vision and full shared unit control of (Picked player) units with his/her allies
Set left[(Player number of (Picked player))] = True

Hope that helps,
Malleus
09-24-2003, 01:52 AM#6
Dalten
Thanks for the help, I got UMSWE and it was fairly easy to create a trigger that controlled it the way I wanted, thanks.