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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
/*-- Shoot inventory object --*/
#strict 2
#appendto AXE1
#appendto EGBL
#appendto SFLN
#appendto EFLN
#appendto GBLT
#appendto ROCK
#appendto SWOR
#appendto SPER
#appendto TSWB
protected func Activate(object clonk)
{
[$Shoot$|Image=GNPW]
// Sound
if (GetID() == EGBL)
{
Sound("Blast*");
Sound("Crystal3");
}
else if (GetID() == SPER)
{
Sound("Arrow");
}
else if (GetID() == TSWB)
{
Sound("Arrow");
}
else if (GetID() == GBLT)
{
Sound("Blast*");
Sound("Crystal3");
}
else if (GetID() == SWOR)
{
Sound("Blast*");
Sound("SwordHit*");
}
else if (GetID() == AXE1)
{
Sound("Blast*");
Sound("AxeHit*");
}
else
{
Sound("Blast*");
}
// Make shooting clonk responsible for possible kill and owner of object to be shot
SetController(clonk->GetOwner());
SetOwner(clonk->GetOwner());
// Shoot
if (GetID() == EGBL)
{
Exit(0, -10 + 20 * clonk->GetDir());
SetYDir(-10);
SetXDir(-100 + 200 * clonk->GetDir());
}
else if (GetID() == ROCK)
{
Exit(0, -10 + 20 * clonk->GetDir());
SetYDir(-15);
SetXDir(-100 + 200 * clonk->GetDir());
}
else if (GetID() == TSWB)
{
Exit(0, -5 + 10 * clonk->GetDir());
SetYDir(-30);
SetXDir(-50 + 100 * clonk->GetDir());
}
else if (GetID() == SPER)
{
Exit(0, -10 + 20 * clonk->GetDir(), -4, 0 + 180 * clonk->GetDir(), -150 + 300 * clonk->GetDir(), -7);
SetYDir(-7);
SetXDir(-175 + 350 * clonk->GetDir());
}
else
{
Exit(0, -10 + 20 * clonk->GetDir(), 0, 0 + 360 * clonk->GetDir(), -80 + 160 * clonk->GetDir(), -15);
SetYDir(-15);
SetXDir(-80 + 160 * clonk->GetDir());
}
return 1;
}
|