Forum

> > CS2D > Scripts > x=x works?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch x=x works?

2 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt x=x works?

EnderCrypt
User Off Offline

Zitieren
addhook("movetile","hook_movetile")
function hook_movetile(id,x,y)
current = {x=x,y=y}
end

ehh will this work?

alt Re: x=x works?

Lee
Moderator Off Offline

Zitieren
It's syntactically correct, but every time a (any) player moves, the global variable current is overwritten with the new table. Essentially, the information in current is the most recent movement made by any player, but without tracking that player. If it tracks the id, then its a porous (incorrect) re-implementation of player(id, "tilex"), but without the id, the information is meaningless.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht