Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-16-2004, 12:49 PM
Com013 Com013 is offline
Registered User
Join Date: Aug 2002
Location: GMT+1
Posts: 381
Com013 is on a distinguished road
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...
__________________
Com013
Former Admin of the LAT on Graal The Adventure

e-mail: [email protected]
Reply With Quote
  #2  
Old 01-16-2004, 01:56 PM
Hevaricubed Hevaricubed is offline
Registered User
Join Date: Aug 2003
Posts: 262
Hevaricubed is on a distinguished road
Send a message via AIM to Hevaricubed Send a message via Yahoo to Hevaricubed
wash[b][/b]it

Also i dont think if hurtdx and hurtdy are actual built-in variables are they?
__________________
Reply With Quote
  #3  
Old 01-17-2004, 04:45 PM
Com013 Com013 is offline
Registered User
Join Date: Aug 2002
Location: GMT+1
Posts: 381
Com013 is on a distinguished road
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.
__________________
Com013
Former Admin of the LAT on Graal The Adventure

e-mail: [email protected]
Reply With Quote
  #4  
Old 01-17-2004, 10:54 PM
Judge_S Judge_S is offline
A Logic Bot
Judge_S's Avatar
Join Date: Mar 2003
Location: Kelowna, BC, Canada
Posts: 3,953
Judge_S is on a distinguished road
Send a message via ICQ to Judge_S Send a message via AIM to Judge_S Send a message via MSN to Judge_S
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.
__________________
Reply With Quote
  #5  
Old 01-17-2004, 11:02 PM
Crono Crono is offline
:pluffy:
Join Date: Feb 2002
Location: Sweden
Posts: 20,000
Crono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond reputeCrono has a reputation beyond repute
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.
__________________
Reply With Quote
  #6  
Old 01-17-2004, 11:24 PM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
...hurtdx and hurtdy are suppose to change when the npc is hit...
__________________
Reply With Quote
  #7  
Old 01-18-2004, 11:59 AM
Com013 Com013 is offline
Registered User
Join Date: Aug 2002
Location: GMT+1
Posts: 381
Com013 is on a distinguished road
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.
__________________
Com013
Former Admin of the LAT on Graal The Adventure

e-mail: [email protected]
Reply With Quote
  #8  
Old 01-21-2004, 04:35 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
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)
Reply With Quote
  #9  
Old 01-21-2004, 05:12 PM
-Ramirez- -Ramirez- is offline
Registered User
Join Date: Jun 2002
Location: USA, Ohio
Posts: 729
-Ramirez- has a spectacular aura about
Quote:
Originally posted by Stefan
The hit coordinates are ok
...except for really small or really large projectiles, as we discussed. :P
__________________
Kat
Reply With Quote
  #10  
Old 01-21-2004, 05:13 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
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
Reply With Quote
  #11  
Old 01-21-2004, 05:17 PM
-Ramirez- -Ramirez- is offline
Registered User
Join Date: Jun 2002
Location: USA, Ohio
Posts: 729
-Ramirez- has a spectacular aura about
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.
__________________
Kat
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:13 PM.


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