1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
#strict 2
func Attach(object to)
{
SetOwner(GetOwner(to));
SetAction("Attach", to);
SetVisibility(VIS_Allies | VIS_God);
}
func Show(string text, int time)
{
AddEffect("ShowText", this, 20, 1, this, GetID(), text, time);
}
func FxShowTextStart(object target, int effectNumber, int temp, string text, int time)
{
if (temp) return;
EffectVar(0, target, effectNumber) = text;
EffectVar(1, target, effectNumber) = time;
Message("@%s", target, text);
}
func FxShowTextTimer(object target, int effectNumber, int time)
{
var showTime = EffectVar(1, target, effectNumber);
if (time > showTime)
{
if (time >= showTime + showTime / 3) return FX_Execute_Kill;
Message("@<c %x>%s</c>", target, RGBa(255, 255, 255, 255 - ((time - showTime) * 255)/(showTime / 3)), EffectVar(0, target, effectNumber));
}
}
func FxShowTextStop(object target, int effectNumber, int reason, bool temp)
{
if (!temp) Message("", target);
}
func FxShowTextEffect(string newEffectName, object target, int effectNumber)
{
if(newEffectName == "ShowText")
{
RemoveEffect(0, target, effectNumber);
}
}
|