Example application: spawn effect or x - y teleport player.
Forum
CS2D Scripts pixelspixels
5 replies 1
Example application: spawn effect or x - y teleport player.
Add additional 16 (half of 32) to x and y to get the center position of that tile.
e.g.:
The tile position is 38|13 here. First value is x, second is y.
x = 38 tiles * 32 pixels = 1216 pixels
y = 13 tiles * 32 pixels = 416 pixels
for the top left corner of the hovered tile.
center would be
x = 1216 + 16 = 1232
y = 416 + 16 = 432
1
2
3
4
2
3
4
xjaile = 1 yjaile = 1 timer(15000,"parse",'effect "colorsmoke" "..xjaile*6120-60 .." "..yjaile*2490-75) 48 32 255 0 0')
wrong! HELP
edited 2×, last 09.01.16 05:03:13 pm
1
2
3
4
2
3
4
jail = {x = 6120-60, y = 2490-75} timer(15000,"parse",'effect "colorsmoke" "..jail.x.." "..jail.y.." 48 32 255 0 0')
By the way, sorry for not actually fix your code, im not on my laptop
Closed.
1