Jass:MeleeExposeAllPlayers
Aus Mappedia
| Funktion: MeleeExposeAllPlayers | |
|---|---|
| Parameter: | nothing |
| Rückgabewert: | nothing |
| Autor: | Blizzard |
| Quelle: | Blizzard.j |
| Synchron: | Unbekannt |
Code
function MeleeExposeAllPlayers takes nothing returns nothing local integer playerIndex local player indexPlayer local integer playerIndex2 local player indexPlayer2 local force toExposeTo = CreateForce() set playerIndex = 0 loop set indexPlayer = Player(playerIndex) call ForceClear( toExposeTo ) call CripplePlayer( indexPlayer, toExposeTo, false ) set playerIndex2 = 0 loop set indexPlayer2 = Player(playerIndex2) if playerIndex != playerIndex2 then if (not PlayersAreCoAllied(indexPlayer, indexPlayer2)) then call ForceAddPlayer( toExposeTo, indexPlayer2 ) endif endif set playerIndex2 = playerIndex2 + 1 exitwhen playerIndex2 == bj_MAX_PLAYERS endloop call CripplePlayer( indexPlayer, toExposeTo, true ) set playerIndex = playerIndex + 1 exitwhen playerIndex == bj_MAX_PLAYERS endloop call DestroyForce( toExposeTo ) endfunction
