View difference between Paste ID: MWPCCiM5 and 2SPF9KpH
SHOW: | | - or go back to the newest paste.
1
Bounding
2
	var
3
		maxX
4
		minX
5
		maxY
6
		minY
7
	
8
	New(MAX_X, MIN_X, MAX_Y, MIN_Y)		
9
		maxX = MAX_X
10
		minX = MIN_X
11
		maxY = MAX_Y
12
		minY = MIN_Y
13
	
14
	proc
15
		isValid(X,Y)
16
			return X < maxX && X > minX && Y < maxY && Y > minY
17
			
18
mob/Krillin
19
	var/Bounding/bounding
20
	
21
	Move(var/atom/NewLoc,Dir,step_x,step_y) 
22
		if(bounding.isValid(NewLoc.x, NewLoc.y)) return ..()
23
		else return 0
24
	
25
	New()
26
		AI()
27
	
28
	proc
29
		AI()
30
			spawn()
31
				while(src)
32
					var/nextAction = pick("move","attack","teleport")
33
					switch(nextAction)
34
						if("move")
35
							// Fill this
36
						if("attack")
37
							// Fill this
38
						if("teleport")
39
							// Fill this
40
					sleep(10)
41
42
mob/verb/Krillin()
43
    var/mob/Krillin/K = new(locate(x,y+3,z))
44
    K.bounding = new/Bounding(x+4,x-4,y+4,y-4)