-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathanti-grenade_e2.txt
45 lines (42 loc) · 906 Bytes
/
anti-grenade_e2.txt
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
@name Pies TTS
@inputs AntiBoom:entity
@persist RunCount [AntiBoom,G]:entity
if(first()){
#noDuplications()
if(->AntiBoom){
if(AntiBoom:isValid()){
timer("Find",2000)
}
}
}
if(->AntiBoom && ~AntiBoom){
AntiBoom:noDraw(1)
AntiBoom:setPos(entity():pos()-vec(0,0,500))
AntiBoom:setAng(ang())
timer("Find",2000)
}
if(clk("Find")){
RunCount++
findIncludeClass("m9k_thrown_m61")
findInSphere(entity():pos(),1000)
E=findClosest(entity():pos())
if(E:isValid()){
G=E
timer("Stop",10)
}else{
if(RunCount<=10){
timer("Find",500)
}else{
reset()
}
}
}
if(clk("Stop")){
if(AntiBoom:isValid() && G:isValid()){
AntiBoom:setPos(G:pos())
timer("Stop",10)
}else{
AntiBoom:setPos(entity():pos()-vec(0,0,500))
timer("Find",500)
}
}