Quote:
Originally posted by ZeLpH_MyStiK
...hurtdx and hurtdy are suppose to change when the npc is hit...
|
Yes, they are, but not this way.
Open the offline editor, put one of those default NPCs on the board, make it hurtable and look at the code for the hurting.
It is the script that sets the hurtdx/y values, not the engine.
The only case where the engine sets the hurtdx/y values - or used to on clientside - was when another script hit it (using hitobjects or similiar things).
So I relied on that if the hurtdx/y values changed (whether by my own script or by hitobjects doesn't matter) that they have the correct values and that the hearts are decreased.
Edit: and two weeks ago the sword didn't set the values, it just triggered the event.
Anyway, I believe I found a way around that problem, but I still think it is a bug that should be fixed.
Another thing related to that is the hitdetection on showcharacter scripts - you have to hit the top-left blocking tile of it so it detects the hit. Kat told me the same problem happens with projectiles, too.