Sorry

Spoiler 

(135 degrees = x + 1 and y + 1, just saw)
Y u no work?
----
The idea of the script is that when someone hits you, while facing 90 degrees, and you're next to a wall, there'd appear a bloodsplash on the wall.
And don't complain about GE_val etc not existing please, they do exist.
----
Help?


(135 degrees = x + 1 and y + 1, just saw)
Spoiler 

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
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
function GE_hit(id, source) 	local g = player(id, 'tilex') 	local h = player(id, 'tiley') 	local i = g * 32 	local j = h * 32 	if player(id, 'team') ~= player(source, 'team') then 		if m > 22.5 and m < 67.5 then 			if tile(g + 1, h + 1, 'wall') == true then 				GE_img[GE_val] = image(P..'d45.png', i + 32, j + 32, 1) 			end 		elseif m > 67.5 and m < 112.5 then 			if tile(g + 1, h, 'wall') == true then 				GE_img[GE_val] = image(P..'d90.png', i + 32, j, 1) 			end 		elseif m > 112.5 and m < 157.5 then 			if tile(g + 1, h - 1, 'wall') == true then 				GE_img[GE_val] = image(P..'d135.png', i + 32, j - 32, 1) 			end 		elseif m > 157.5 and m < 202.5 then 			if tile(g, h - 1, 'wall') == true then 				GE_img[GE_val] = image(P..'d180.png', i, j - 32, 1) 			end 		elseif m > 202.5 and m < 247.5 then 			if tile(g - 1, h - 1, 'wall') == true then 				GE_img[GE_val] = image(P..'d225.png', i - 32, j - 32, 1) 			end 		elseif m > 247.5 and m < 292.5 then 			if tile(g - 1, h, 'wall') == true then 				GE_img[GE_val] = image(P..'d270.png', i - 32, j, 1) 			end 		elseif m > 292.5 and m < 337.5 then 			if tile(g - 1, h + 1, 'wall') == true then 				GE_img[GE_val] = image(P..'d315.png', i - 32, j + 32, 1) 			end 		elseif m > 337.5 or m < 22.5 then 			if tile(g, h + 1, 'wall') == true then 				GE_img[GE_val] = image(P..'d380.png', i, j + 32, 1) 			end 		end 	end end
Y u no work?
----
The idea of the script is that when someone hits you, while facing 90 degrees, and you're next to a wall, there'd appear a bloodsplash on the wall.
And don't complain about GE_val etc not existing please, they do exist.
----
Help?
edited 3×, last 23.04.12 03:45:02 pm