jk2pach Invité
|
Posté le: 18/03/10 19:25 Sujet du message: Library: GlobalVariables |
|
|
Jass: | scope Glob initializer init
globals
constant integer RAVEN = 'Amrf'
constant integer GARN = 'Abun'
constant integer ERRE = 'Awan'
boolean array Military [12]
boolean array Pirate [12]
boolean array Merchant [12]
boolean array Terrorist [12]
boolean array Alien [12]
boolean CreepsEnabled
integer SOUND_GOLD
unit array Freeport [16]
constant integer MAXPLAYER = 11
string array PlayerColor [12]
endglobals
private function AddRaven takes nothing returns boolean
local unit enteringUnit = GetTriggerUnit()
if GetUnitAbilityLevel(enteringUnit,RAVEN)<= 0 then
call UnitAddAbility(enteringUnit,RAVEN)
call UnitRemoveAbility(enteringUnit,RAVEN)
else
call UnitRemoveAbility(enteringUnit,RAVEN)
endif
set enteringUnit = null
return false
endfunction
public function init takes nothing returns nothing
local trigger t = CreateTrigger()
set PlayerColor[0] = "|c00ff0000"
set PlayerColor[1] = "|c000000ff"
set PlayerColor[2] = "|c0000ffff"
set PlayerColor[3] = "|c00800080"
set PlayerColor[4] = "|c00ffff00"
set PlayerColor[5] = "|c00ff8000"
set PlayerColor[6] = "|c0000ff00"
set PlayerColor[7] = "|c00ff00ff"
set PlayerColor[8] = "|c00AAAAFF"
set PlayerColor[9] = "|c00005500"
set PlayerColor[10] = "|c00B06000"
set PlayerColor[11] = "|c00AAAAAA"
call AbilityPreload(RAVEN)
call AbilityPreload(GARN)
call AbilityPreload(ERRE)
set SOUND_GOLD = DefineSound("Abilities\\Spells\\Other\\Transmute\\AlchemistTransmuteDeath1.wav",1601 , false, true)
call TriggerRegisterEnterRectSimple(t, bj_mapInitialPlayableArea)
call TriggerAddCondition( t, Condition( function AddRaven ) )
endfunction
endscope |
_________________
|
|