
02-17-2012, 08:47 PM
|
|
Banned
|
Join Date: Jul 2004
Location: London
Posts: 2,029
|
|
|
While setshape parameters are in pixels, npc.width and .height are actually in tiles. So Emera had this part right, maybe with the exception of checking player.x and player.y, those being the top left of the player rather than the center - player.x + 1.5 and player.y + 2.
I don't think having the NPC move clientside is a good solution, as everybody will see it differently on their own client, so you won't be able to see others get hit before they're eliminated. The event would probably be more fun if the NPC moved serverside via the move() function at high speeds, you could then check for an intersect in the clientside portion of the script in a timeout. |
|
|
|