Forum

> > CS2D > Scripts > x=x works?
Forums overviewCS2D overview Scripts overviewLog in to reply

English x=x works?

2 replies
To the start Previous 1 Next To the start

old x=x works?

EnderCrypt
User Off Offline

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

ehh will this work?

old Re: x=x works?

Lee
Moderator Off Offline

Quote
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.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview