Quote:
|
Originally Posted by Stefan
The engine cannot do everything for you. You are sure the player is not touching the npc? Does it happen in each walking direction?
On zone there is pixel-exact movement and if you stop 1 pixel before the npc then its not invoking the playertouchsme-event.
|
Well, at times it behaves more strangely than others. Player's logon and say the hit detection suddenly became better or suddenly became worse.
I'll upload a test level specifically for it.
In this test level, it's seeming that a distance of 0.5 from the player is sufficient. Also 0.75 is sufficient. Also 0.85 is sufficient. Also, 15/16 is sufficient.
Classic: test_playertouchsme.nw
It seems as though if the player comes within less than one tile away from the NPC... which would mean that hit detection is affecting all players that come within one extra tile of it. It might have something to do with how the movement system works, though.
But that wouldn't make so much sense anyway, because it still happens with gravity boots on. Yea, and I just made a test, so I know it doesn't have to do with how the movement works (unless NPC-induced false movement has nothing in common with NPCW-induced false movement).
false movement (I made this up): changing your coords to one thing and back in a single iteration.
I'm guessing on playertouchsme tests the area (x,y,width,height): (player.x+0.5 + vecx(player.dir), player.y+1 + vecy(player.dir),2,2)
This includes testing for level links. It's not so nice for the Opposite Boots NPCW either because in that case movement isn't based on player.dir (however this touching area is being treated as such. Same is true for any directional changing NPC. Direction changing is making playertouchsme be called again too (probably a very good thing unless the player is twirling around on top of an NPC with that event).
It would also be quite nice if the area was tested for when NPCs move at the player too. That would make a lot of problems disappear.
And I just went on Zone and it does the same thing there... Maybe there just needs to be a new event handler?