Forum
![>](img/i_next.png)
![>](img/icons/cs2d.png)
![>](img/i_next.png)
![>](img/i_next.png)
Check if a player hit the wall !
5 replies![To the start](img/i_first.png)
![Previous](img/i_prev.png)
![Next](img/i_next.png)
![To the start](img/i_last.png)
1. Place a
![cs2d entity](img/i_codehelp.png)
2. Make a map script like so:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
hit_counter = 0 wall_image = 0 wall_x = 1 -- Tile X coordinates of the wall wall_y = 1 -- Tile Y coordinates of the wall addhook("startround_prespawn","s") function s() 	hit_counter = 0 	wall_image = image("<tile:"..tile(wall_x,wall_y,"frame")..">",wall_x*32,wall_y*32,3) 	imagehitzone(wall_image,102,0,0,32,32) 	-- imagehitzone(wall_image,102,-1,-1,34,34) -- if the previous imagehitzone function doesn't quite work end addhook("hitzone","h") function h(iid) 	if iid == wall_image then 		hit_counter = hit_counter + 1 		if hit_counter == 2 then 			parse("triggerposition "..wall_x.." "..wall_y) 			freeimage(wall_image) 			wall_image = 0 		end 	end end
edited 2×, last 09.05.18 12:02:43 am
![user](img/i_friend.png)
![user](img/i_friend.png)
![user](img/i_friend.png)
Although, I got a distinct idea. We'll be about using
![cs2d lua hook](img/i_codehelp.png)
So good luck you who is going to deal with it
![](img/smiles/ugly.gif)
So you check both angles - the moment the player throws the nade
![cs2d lua hook](img/i_codehelp.png)
![cs2d lua hook](img/i_codehelp.png)
The problem is that the damage to the wall will be applied when the nade lands; not when it hits the wall!
So its not possible practicaly.
You do know the player´s cursor position while he throws the nade theoreticly and then... good luck with that
Do you need a script for every wall? I dont think so.
![user](img/i_friend.png)
![user](img/i_friend.png)
![To the start](img/i_first.png)
![Previous](img/i_prev.png)
![Next](img/i_next.png)
![To the start](img/i_last.png)