tilex, tiley = math.random(m.spawn1[1], m.spawn2[1]), math.random(m.spawn1[2], m.spawn2[2])
how to solve?
my map:
RPG_Pokemon_World by kiss the shot ( my map )
monsters.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
addhook("ms100", "MONSTERms100") function MONSTERms100() 	t = t + 1 	if t % 100 == 0 then 		while #MONSTERS < CONFIG.MAXMONSTERS do 			local rand 			repeat 				rand = math.random(#CONFIG.MONSTERS) 			until math.random(0, 100) < CONFIG.MONSTERS[rand].spawnchance 			local m = deepcopy(CONFIG.MONSTERS[rand]) 			local x, y, tilex, tiley 			repeat 				if m.spawn1 then 					tilex, tiley = math.random(m.spawn1[1], m.spawn2[1]), math.random(m.spawn1[2], m.spawn2[2]) 				else 					tilex, tiley = math.random(map'xsize'), math.random(map'ysize')
edited 1×, last 02.12.12 09:54:36 pm