|
其实考虑过重用一个叫余波的地图的..
不过那个东西里面部分地方有限制..限制为了两个分组,也就是说只能看到一方分组的,另外一方依然得那边分组自己输字符串才看得到...
或者..求修改..合并为一组吧..
function TeamLocator takes nothing returns nothing
local player p = GetTriggerPlayer()
local integer i
local integer i2
local real currentlife
local real liferatio
local integer critical = 0
if GetConvertedPlayerId(p)<6 then
set i = 1
else
set i = 6
endif
set i2=i+4
if udg_CorpsmanAlive>0 then
loop
exitwhen i>i2
if i==10 then
set i=11
endif
set currentlife = GetWidgetLife(udg_Hero)
if currentlife>0.405 then
set liferatio = currentlife/GetUnitState(udg_Hero,UNIT_STATE_MAX_LIFE)
if liferatio>0.75 then
call PingMinimapEx(GetUnitX(udg_Hero), GetUnitY(udg_Hero), 2.0, 0, 200, 0, false)
elseif liferatio>0.4 then
call PingMinimapEx(GetUnitX(udg_Hero), GetUnitY(udg_Hero), 3.0, 200, 200, 0, false)
else
set critical=1
call PingMinimapEx(GetUnitX(udg_Hero), GetUnitY(udg_Hero), 5.0, 200, 0, 0, false)
endif
endif
set i=i+1
endloop
if critical==1 then
call StartSound(gg_snd_SentryOnline)
endif
else
loop
exitwhen i>i2
if i==10 then
set i=11
endif
if GetWidgetLife(udg_Hero)>0.405 then
call PingMinimapEx(GetUnitX(udg_Hero), GetUnitY(udg_Hero), 2.0, 25, 25, 200, false)
endif
set i=i+1
endloop
endif
endfunction
//===========================================================================
function InitTrig_Team_Locator takes nothing returns nothing
set gg_trg_Team_Locator = CreateTrigger()
call TriggerAddAction(gg_trg_Team_Locator,function TeamLocator)
endfunction |
|