Jass:MeleeStartingUnitsUnknownRace
Aus Mappedia
| Funktion: MeleeStartingUnitsUnknownRace | |
|---|---|
| Parameter: | player location boolean boolean boolean |
| Rückgabewert: | nothing |
| Autor: | Blizzard |
| Quelle: | Blizzard.j |
| Synchron: | Unbekannt |
Code
function MeleeStartingUnitsUnknownRace takes player whichPlayer, location startLoc, boolean doHeroes, boolean doCamera, boolean doPreload returns nothing local integer index if (doPreload) then endif set index = 0 loop call CreateUnit(whichPlayer, 'nshe', GetLocationX(startLoc) + GetRandomReal(-256, 256), GetLocationY(startLoc) + GetRandomReal(-256, 256), GetRandomReal(0, 360)) set index = index + 1 exitwhen index == 12 endloop if (doHeroes) then // Give them a "free hero" token, out of pity. call SetPlayerState(whichPlayer, PLAYER_STATE_RESOURCE_HERO_TOKENS, bj_MELEE_STARTING_HERO_TOKENS) endif if (doCamera) then // Center the camera on the initial sheep. call SetCameraPositionLocForPlayer(whichPlayer, startLoc) call SetCameraQuickPositionLocForPlayer(whichPlayer, startLoc) endif endfunction
Parameter
| Typ | Name | Beschreibung |
|---|---|---|
| player | whichPlayer | |
| location | startLoc | |
| boolean | doHeroes | |
| boolean | doCamera | |
| boolean | doPreload |
