Forum

> > CS2D > Scripts > How to get a map sprite x, y position?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch How to get a map sprite x, y position?

2 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Re: How to get a map sprite x, y position?

Cure Pikachu
User Off Offline

Zitieren
Like the region where the sprite from cs2d entity env_sprite is covering?
1
2
3
4
5
local x1, y1, x2, y2
x1 = x * 32 + entity(x,y,"int2")
y1 = y * 32 + entity(x,y,"int3")
x2 = x1 + entity(x,y,"int0")
y2 = y1 + entity(x,y,"int1")
where
x
and
y
represent the x and y tile position of the sprite entity itself.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht