i going to make new lua and post in unrealsoftware
but i got error
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
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
npc = {} npc.x = (map('xsize')*32) / 2 npc.y = (map('ysize')*32) / 2 npc.img = image('gfx/sprites/flare3.bmp',npc.x,npc.y,1) npc.times = 0 npc.rot = 0 addhook("second","times") function times() 	if npc.times > 0 then 		npc.times = npc.times - 1 	end 	if npc.times == nil then 		npc.times = 0 	end end addhook("always","move") function move() 	if npc.img ~= 0 then 		if npc.times == 0 then 			if npc.rot < 360 then 				npc.rot = npc.rot + 1 			elseif npc.rot > 360 then 				npc.rot = npc.rot - 360 			end 			local rot = math.rad(npc.rot - 180) 	 	npc_x = npc.x - math.sin(rot) * math.random(1,3) 	 	 	npc_y = npc.y + math.cos(rot) * math.random(1,3) 	 	 		if tile(npc.x/32,npc.y/32,'walkable') then 	 	 			if npc_x < map('xsize')*32 and npc_y < map('ysize')*32 then 							npc.x = npc_x 							npc.y = npc_y 						end	 					else 						rot2 = math.rad(npc.rot + 180) 	 			npc.x = npc.x - math.sin(rot2) * 16 						npc.y = npc.y + math.sin(rot2) * 16 	 	 		end 						imagepos(npc.img,npc.x,npc.y,rot) 		end 	end end
---how to set my image to go orther way ? ---
---when it went on wall --