Name | Type | is_array | initial_value |
Cast | location | No | |
End | timer | No | |
Execution_Order | integer | No | |
F | integervar | No | |
F_Angle | real | Yes | |
F_Distance | real | Yes | |
F_Group | group | Yes | |
F_Height | real | Yes | |
F_Hero | unit | Yes | |
F_Point | location | Yes | |
F_Spawn | integervar | No | |
F_Speed | real | Yes | |
F_Targ | location | Yes | |
F_Unit | unit | Yes | |
FAIL | integer | No | |
FAIL_Off | boolean | Yes | |
FAIL_Skip | integer | No | |
FAIL_Times | integer | No | |
Lyric_Trigger | trigger | No | |
NextLyric | timer | No | |
Point | location | No | |
SFX | effect | No | |
Sheep_Integer | integervar | No | |
Sheep_Off | boolean | Yes | |
Smash | location | Yes | |
Spam | location | No | |
Time_Expire | timer | No | |
Trigger | trigger | No | |
Trigger_Script | trigger | Yes | |
Unit | unit | Yes | |
Unit_Group | group | No | |
Wait_Script | real | Yes | |
Wait_Time | real | No |
//TESH.scrollpos=21
//TESH.alwaysfold=0
scope Subtitle initializer Init
globals
private hashtable hash = InitHashtable()
endglobals
function DisplaySubtitle takes string line1 returns nothing
local string char
local integer i = 0
local real charwidth
local real totalwidth = 0.
loop
set char = SubString(line1 , i , i + 1)
exitwhen char == ""
if StringCase(char , false) == char then
set charwidth = LoadReal(hash ,0,StringHash("low" + char))
else
set charwidth = LoadReal(hash ,0,StringHash("upp" + char))
endif
if charwidth == 0.0 then
set charwidth = 1.56
endif
set totalwidth = totalwidth + charwidth
set i = i + 1
endloop
set i = R2I(( 50.0 - totalwidth / 2 ) / LoadReal(hash ,0,StringHash("low ")))
set char = ""
loop
exitwhen i <= 3
set char = char + " "
set i = i - 1
endloop
set line1 = char + line1
call DisplayTimedTextToPlayer(GetLocalPlayer() , 0.25 , 0.0 , 1000.0 , "\n\n\n\n\n\n\n\n\n\n\n\n" + line1 + "\n\n\n\n\n\n\n\n\n\n\n\n")
endfunction
private function Init takes nothing returns nothing
call SaveReal(hash,0,StringHash("uppa"), 2.06)
call SaveReal(hash,0,StringHash("uppb"), 1.62)
call SaveReal(hash,0,StringHash("uppc"), 1.83)
call SaveReal(hash,0,StringHash("uppd"), 1.93)
call SaveReal(hash,0,StringHash("uppe"), 1.53)
call SaveReal(hash,0,StringHash("uppf"), 1.22)
call SaveReal(hash,0,StringHash("uppg"), 2.04)
call SaveReal(hash,0,StringHash("upph"), 2.00)
call SaveReal(hash,0,StringHash("uppi"), 0.77)
call SaveReal(hash,0,StringHash("uppj"), 0.80)
call SaveReal(hash,0,StringHash("uppk"), 1.83)
call SaveReal(hash,0,StringHash("uppl"), 1.48)
call SaveReal(hash,0,StringHash("uppm"), 2.64)
call SaveReal(hash,0,StringHash("uppn"), 2.00)
call SaveReal(hash,0,StringHash("uppo"), 2.25)
call SaveReal(hash,0,StringHash("uppp"), 1.56)
call SaveReal(hash,0,StringHash("uppq"), 2.37)
call SaveReal(hash,0,StringHash("uppr"), 1.79)
call SaveReal(hash,0,StringHash("upps"), 1.56)
call SaveReal(hash,0,StringHash("uppt"), 1.51)
call SaveReal(hash,0,StringHash("uppu"), 1.87)
call SaveReal(hash,0,StringHash("uppv"), 1.83)
call SaveReal(hash,0,StringHash("uppw"), 2.82)
call SaveReal(hash,0,StringHash("uppx"), 2.04)
call SaveReal(hash,0,StringHash("uppy"), 1.79)
call SaveReal(hash,0,StringHash("uppz"), 1.79)
call SaveReal(hash,0,StringHash("lowa"), 1.51)
call SaveReal(hash,0,StringHash("lowb"), 1.59)
call SaveReal(hash,0,StringHash("lowc"), 1.47)
call SaveReal(hash,0,StringHash("lowd"), 1.62)
call SaveReal(hash,0,StringHash("lowe"), 1.59)
call SaveReal(hash,0,StringHash("lowf"), 0.98)
call SaveReal(hash,0,StringHash("lowg"), 1.76)
call SaveReal(hash,0,StringHash("lowh"), 1.59)
call SaveReal(hash,0,StringHash("lowi"), 0.65)
call SaveReal(hash,0,StringHash("lowj"), 0.77)
call SaveReal(hash,0,StringHash("lowk"), 1.47)
call SaveReal(hash,0,StringHash("lowl"), 0.68)
call SaveReal(hash,0,StringHash("lowm"), 2.27)
call SaveReal(hash,0,StringHash("lown"), 1.56)
call SaveReal(hash,0,StringHash("lowo"), 1.66)
call SaveReal(hash,0,StringHash("lowp"), 1.62)
call SaveReal(hash,0,StringHash("lowq"), 1.62)
call SaveReal(hash,0,StringHash("lowr"), 0.98)
call SaveReal(hash,0,StringHash("lows"), 1.26)
call SaveReal(hash,0,StringHash("lowt"), 1.00)
call SaveReal(hash,0,StringHash("lowu"), 1.59)
call SaveReal(hash,0,StringHash("lowv"), 1.59)
call SaveReal(hash,0,StringHash("loww"), 2.29)
call SaveReal(hash,0,StringHash("lowx"), 1.59)
call SaveReal(hash,0,StringHash("lowy"), 1.59)
call SaveReal(hash,0,StringHash("lowz"), 1.47)
call SaveReal(hash,0,StringHash("low."), 0.51)
call SaveReal(hash,0,StringHash("low,"), 0.55)
call SaveReal(hash,0,StringHash("low "), 0.80)
call SaveReal(hash,0,StringHash("low-"), 1.04)
endfunction
endscope