plz help.
Forum
CS2D Scripts how i can know the y and x in map ?how i can know the y and x in map ?
8 replies 1
plz help.
Y = Vertical
1 CS2D PIXEL = 32 XY
or
XXX
XXX
XXX
'32
and i dont understant .
40 * 32 = 1280
1280 / 2 = 640
or
X = 640
Y = 640
i understant
Its coordinates (in tiles) is X=12 and Y=7:
In CS2D a tile is 32 pixels width and 32 pixels height. So that means a tile is 32x32. To convert these tile coordinates to pixel coordinates that we got before, you have to multiply them by 32.
X = 12 (Tiles) X = 12*32 (Pixels) X = 384
Y = 7 (Tiles) Y = 7*32 (Pixels) Y = 224
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
addhook("say", "OnSay") OnSay = function(id, txt) 	if txt == "!pos" then 		local POS = "Your position is: X = "..player(id, "x").."("..player(id, "tilex").."), Y = "..player(id, "y").."("..player(id, "tiley")..")" 		msg2(id, POS) 		return 1 	end end
1