Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   washit (https://forums.graalonline.com/forums/showthread.php?t=50446)

Com013 01-16-2004 12:49 PM

was hit
 
This problem happens on Classicdev.
When you hit a script with the default sword, the hurtdx/y values are changed, but not the hearts. The hurtdx/y vector is even pointing into the wrong direction.

This is quite annoying as a) I use hurtdx/y to check whether the object is already in the hurt mode and so my script thinks that it doesn't need to remove hearts from the object (The object is invulnerable to the sword because of this).

And b) the hurtdx/y values are even wrong, and the object is not flying into the direction I intend to.

I reduced the problem to this script:

NPC Code:

if (created) {
showcharacter;
hearts = 6;
}
if (wa**** || playertouchsme) {
message #v(hearts) - #v(hurtdx) - #v(hurtdy);
}



Edit: Could anyone please remove this stupid filter? It censored my sword-hit event...

Hevaricubed 01-16-2004 01:56 PM

wash[b][/b]it

Also i dont think if hurtdx and hurtdy are actual built-in variables are they?

Com013 01-17-2004 04:45 PM

Quote:

Originally posted by Hevaricubed
wash[b][/b]it
I know, but I left the censored form to point out how useless the filter is - and what is the intended use for them when we have moderators anyway?

Quote:

Also i dont think if hurtdx and hurtdy are actual built-in variables are they?
They are.

Judge_S 01-17-2004 10:54 PM

Quote:

Originally posted by Com013


I know, but I left the censored form to point out how useless the filter is - and what is the intended use for them when we have moderators anyway?

So the moderators don't have to go running around after every little twit who decides to be a pottymouth.

The filter should be improved, yes, but not removed.

Crono 01-17-2004 11:02 PM

Quote:

Originally posted by Judge_S


So the moderators don't have to go running around after every little twit who decides to be a pottymouth.

That's the point. They don't.

ZeLpH_MyStiK 01-17-2004 11:24 PM

...hurtdx and hurtdy are suppose to change when the npc is hit...

Com013 01-18-2004 11:59 AM

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.

Admins 01-21-2004 04:35 PM

The hurtdx/hurtdy give the vector of where the npc should move. The hit coordinates are ok, I have already spoken with Kat to explain it. The area that is hit is a rectangle of (0.5,1)-(2.5,3)

-Ramirez- 01-21-2004 05:12 PM

Quote:

Originally posted by Stefan
The hit coordinates are ok
...except for really small or really large projectiles, as we discussed. :P

Admins 01-21-2004 05:13 PM

The projectile is seen as a point yes, so big projectiles can be a problem. The other problems were mainly caused by placing the projectile wrong or placing the gfx in the projectile gani wrong

-Ramirez- 01-21-2004 05:17 PM

Quote:

Originally posted by Stefan
The other problems were mainly caused by placing the projectile wrong or placing the gfx in the projectile gani wrong
Bah, regardless, as I mentioned before, if you have a very small projectile, it will hit in some areas several pixels before it actually touches the player. That's really annoying. However, just forget projectiles and give us a way to make our own "shoot" events. :)


All times are GMT +2. The time now is 07:03 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.