HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Disabling Shared Units

12-29-2006, 10:26 PM#1
Oblivion9
I was wondering if there was some sort of short cut or quick fix to prevent shared control of units with other players (basically making that box in the f11 disabled). This might be a simple question, but I couldn't find anything on it in these forums (although I might have not used the right keyword).
12-30-2006, 02:38 AM#2
Hydrolisk
You could make a map initialization trigger that says something like:
Trigger:
Event: Map Initilization
Condition:
Action:Turn OFF shared units for ALL PLAYERS.
I don't know if that would work, as I can't check in the WE.
BTW, can someone teach me how to properly do trigger tags?
12-30-2006, 09:48 PM#3
Pyrogasm
I should probably PM you this, but here's how to use the tags:

When entering things, you use a group of 4 spaces ( ) to make extensions on things (that might not be the right word). The "Events, Condtitions, and Actions" all go in the same colum (no spaces before them) like this:

[trigger]
Events
Conditions
Actions
[/trigger]

Which looks like this:
Trigger:
Events
Conditions
Actions

If you want to make an event under the "events" section (or new action, or condition), start a new line, and indent (in groups of 4 spaces) to the next indent past the line that you want the new line to come from.

This: (The { } is just to show the spaces)
[trigger]
Events
{ }Unit - A unit enters Region <gen>
Conditions
{ }((Triggering Unit) is alive) equal to true
Actions
{ }Unit - Kill (Triggering Unit)
[/trigger]

Looks like this:
Trigger:
Collapse Events
Unit - A unit enters Region <gen>
Collapse Conditions
((Triggering Unit) is alive) equal to true
Collapse Actions
Unit - Kill (Triggering Unit)
Just make sure you always add things like "Unit - A unit dies", not just "A unit dies" in order to get the right icon.

If you just click on a trigger in WE and select "copy as text" and then paste it in a post, you should see how the formatting works. And here's an informative post.
12-31-2006, 08:45 AM#4
Oblivion9
Quote:
Originally Posted by Hydrolisk
You could make a map initialization trigger that says something like:
Trigger:
Collapse Events
Map Initilization
Conditions
Collapse Actions
Turn OFF shared units for ALL PLAYERS.
I don't know if that would work, as I can't check in the WE...
Where exactly would this "Turn OFF shared units for ALL PLAYERS" be? I just went thru them again and I didn't see a thing! The closest thing I found was "GAME - Share Vision and Full Unit Control With Team", but no way to turn it off! Maybe it's a jass script? Anyone?
12-31-2006, 08:56 AM#5
zeroXD
I cant find any GUI/JASS to do it, but I think changing options in "Cenario => Force Properties..." and do Lock Player Settings (think it was called that). It is pretty limited, though.
01-12-2007, 07:21 AM#6
Oblivion9

Are you suggesting the "Fixed Player Settings" box under Scenario? Cos, that doesn't disallow players from sharing control... Unless of course you uncheck Share Vision, which I want to share vision......................

Eh, I'll keep playing with it, unless someone has a solution.
01-27-2007, 12:17 AM#7
Oblivion9
I apologizing for bumping this, but I have to ask... is this an ubernoob question or is it so difficult that no one knows.
01-27-2007, 01:12 AM#8
shadow1500
Check if that works:
Collapse JASS:
function Trig_NoSharedControl_Actions takes nothing returns nothing
    // Check if the player shared control with anyone, if so, unshare.
    local integer x = 0
    loop
        exitwhen x>11
        if GetPlayerAlliance(GetTriggerPlayer(),Player(x),ALLIANCE_SHARED_CONTROL) then
            call SetPlayerAlliance(GetTriggerPlayer(),Player(x),ALLIANCE_SHARED_CONTROL,false)
        endif
        if GetPlayerAlliance(GetTriggerPlayer(),Player(x),ALLIANCE_SHARED_ADVANCED_CONTROL) then
            call SetPlayerAlliance(GetTriggerPlayer(),Player(x),ALLIANCE_SHARED_ADVANCED_CONTROL,false)
        endif
        set x = x + 1
    endloop
endfunction
function InitTrig_NoSharedControl takes nothing returns nothing
    local integer x = 0
    set gg_trg_NoSharedControl = CreateTrigger()
    loop
        exitwhen x>11
        call TriggerRegisterPlayerEvent(gg_trg_NoSharedControl,Player(x),EVENT_PLAYER_ALLIANCE_CHANGED)
        set x = x + 1
    endloop
    call TriggerAddAction(gg_trg_NoSharedControl, function Trig_NoSharedControl_Actions)
endfunction
Create trigger with name "NoSharedControl", convert to custom text, paste that in.
01-27-2007, 01:39 AM#9
Oblivion9
I will try that... Thank you!!!