Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   onWa****() not working on my server? (https://forums.graalonline.com/forums/showthread.php?t=134262752)

skillmaster19 04-08-2011 10:34 PM

onWa****() not working on my server?
 
For some the onWas.Hit() (yes I removed the dot)function is not working on my server... is there any way I can fix it?

MattKan 04-08-2011 10:58 PM

You should probably post a script that you are trying to use it in, then explain how you are trying to use it; there's probably either something wrong with the script, or you may not understand what it is used for.

skillmaster19 04-08-2011 11:02 PM

Quote:

Originally Posted by MattKan (Post 1642150)
You should probably post a script that you are trying to use it in, then explain how you are trying to use it; there's probably either something wrong with the script, or you may not understand what it is used for.

I know what it is used for... stop trolling my posts. and the script it fine, I looked at it line by line. I get no errors uppon applying the script, yet none of the function works.

xAndrewx 04-08-2011 11:04 PM

Quote:

Originally Posted by skillmaster19 (Post 1642152)
I know what it is used for... stop trolling my posts. and the script it fine, I looked at it line by line. I get no errors uppon applying the script, yet none of the function works.

ok so dont post script. kthx o_o

MrOmega 04-08-2011 11:12 PM

If you don't post the script were just shooting in the dark to help you.

Also, OnWaՏHit is only called when the object is hit by the sword.

Deas_Voice 04-08-2011 11:16 PM

afaik, it's clientsided... check that'

MrOmega 04-08-2011 11:22 PM

Quote:

Originally Posted by Deas_Voice (Post 1642160)
afaik, it's clientsided... check that'

for players yes, but for NPCs it can used serverside.

Shadow5596321 04-08-2011 11:23 PM

Quote:

Originally Posted by skillmaster19 (Post 1642152)
I know what it is used for... stop trolling my posts. and the script it fine, I looked at it line by line. I get no errors uppon applying the script, yet none of the function works.

Obviously there is an error or else it would work.

skillmaster19 04-09-2011 12:10 AM

the script worked fine on another server, but it won't work on mine.

cbk1994 04-09-2011 12:34 AM

We can't help you without details. Is it being used in an NPC or in a weapon? Clientside or serverside? Ideally, post it.

skillmaster19 04-09-2011 12:43 AM

Quote:

Originally Posted by cbk1994 (Post 1642187)
We can't help you without details. Is it being used in an NPC or in a weapon? Clientside or serverside? Ideally, post it.

class, that a npc joins.

WhiteDragon 04-09-2011 12:56 AM

Quote:

Originally Posted by skillmaster19 (Post 1642190)
class, that a npc joins.

Just letting you know that it's going to be very hard for anyone to help you without seeing actual code.

Is there a reason you don't want to paste the relevant pieces? We're here to help after all.

skillmaster19 04-09-2011 02:28 AM

This script wont work.
PHP Code:

function onCreated(){
showcharacter();
}

function 
onWa****(){
this.chat "test";



DustyPorViva 04-09-2011 05:31 AM

Did you happen to change the players default sword ani with replaceani/custom system?

Crow 04-09-2011 08:39 AM

Quote:

Originally Posted by DustyPorViva (Post 1642252)
Did you happen to change the players default sword ani with replaceani/custom system?

Does that break it?

Deas_Voice 04-09-2011 09:03 AM

Quote:

Originally Posted by skillmaster19 (Post 1642220)
This script wont work.
PHP Code:

function onCreated(){
showcharacter();
}

function 
onWa****(){
this.chat "test";



that works perfectly for me; on a singel level. may be that it doesn't work on a gmap.

skillmaster19 04-09-2011 04:37 PM

Quote:

Originally Posted by DustyPorViva (Post 1642252)
Did you happen to change the players default sword ani with replaceani/custom system?

Maybe someone did before me, I'm not sure; however, before I received the server all of the classes and weapons were removed, and I reset my character and the onWas.hit still doesn't work.

Fogell 04-09-2011 05:54 PM

Did you make sure to clean your client with a squeegee before testing anything?

DustyPorViva 04-09-2011 06:15 PM

Quote:

Originally Posted by Crow (Post 1642274)
Does that break it?

Yes, all default hit detection relies on reading sword.gani.

skillmaster19 04-09-2011 06:18 PM

Quote:

Originally Posted by DustyPorViva (Post 1642303)
Yes, all default hit detection relies on reading sword.gani.

How would I fix it?

DustyPorViva 04-09-2011 06:26 PM

Quote:

Originally Posted by skillmaster19 (Post 1642304)
How would I fix it?

Put player.chat = player.ani in a loop to double check and make sure if it's sword.gani or not.

Crow 04-09-2011 06:28 PM

Quote:

Originally Posted by DustyPorViva (Post 1642303)
Yes, all default hit detection relies on reading sword.gani.

This particular event, maybe. But everything else seems to be unaffected. Still using the default stuff on Atlantis with at_sword.gani ^^


Quote:

Originally Posted by skillmaster19 (Post 1642304)
How would I fix it?

Doesn't sound like the gani is your problem. Are you trying this in a single level or on a gmap? Because I know for sure it doesn't work correctly on gmaps.



Edit:
Quote:

Originally Posted by DustyPorViva (Post 1642306)
Put player.chat = player.ani in a loop to double check and make sure if it's sword.gani or not.

Pwetty pwease, make that player.ani.name. Thanks! ^^

skillmaster19 04-09-2011 06:31 PM

Quote:

Originally Posted by Crow (Post 1642307)
This particular event, maybe. But everything else seems to be unaffected. Still using the default stuff on Atlantis with at_sword.gani ^^




Doesn't sound like the gani is your problem. Are you trying this in a single level or on a gmap? Because I know for sure it doesn't work correctly on gmaps.



Edit:


Pwetty pwease, make that player.ani.name. Thanks! ^^

Well its on a gmap

DustyPorViva 04-09-2011 06:59 PM

Quote:

Originally Posted by Crow (Post 1642307)
This particular event, maybe. But everything else seems to be unaffected. Still using the default stuff on Atlantis with at_sword.gani ^^

Hmm... I actually thought about that since you're the one who brought it up. Graal code might be very primitive and still using player.sprite for hit detection. Dunno *shrug*

Quote:

Originally Posted by Crow (Post 1642307)
Pwetty pwease, make that player.ani.name. Thanks! ^^

I actually had that at first but couldn't remember if it was the right way, heh. Been a while since I've scripted.

skillmaster19 04-09-2011 07:30 PM

it says sword, so it seems like the gani is right :/

DustyPorViva 04-09-2011 07:33 PM

Quote:

Originally Posted by skillmaster19 (Post 1642316)
it says sword, so it seems like the gani is right :/

Ya, it might be the gmap thing.

ffcmike 04-09-2011 07:33 PM

Quote:

Originally Posted by Deas_Voice (Post 1642160)
afaik, it's clientsided... check that'

I think this issue here is that this has to be done Clientside if on a GMAP.

skillmaster19 04-09-2011 07:59 PM

Quote:

Originally Posted by ffcmike (Post 1642319)
I think this issue here is that this has to be done Clientside if on a GMAP.

yup thats it! thanks! too bad I have to rescript the whole thing now...

ffcmike 04-09-2011 08:02 PM

Quote:

Originally Posted by skillmaster19 (Post 1642322)
yup thats it! thanks! too bad I have to rescript the whole thing now...

You could try using triggeraction to simply communicate hits from Clientside to Serverside.

Such as like:

PHP Code:

function onCreated(){
  
this.setshape(13232);
}

function 
onActionHit(){
  
//stuff
}

//#CLIENTSIDE

function onWasH1t(){
  
triggeraction(this.1this.1"Hit"params);



skillmaster19 04-09-2011 08:22 PM

Quote:

Originally Posted by ffcmike (Post 1642324)
You could try using triggeraction to simply communicate hits from Clientside to Serverside.

Such as like:

PHP Code:

function onCreated(){
  
this.setshape(13232);
}

function 
onActionHit(){
  
//stuff
}

//#CLIENTSIDE

function onWasH1t(){
  
triggeraction(this.1this.1"Hit"params);



Doesn't seem to work, I also tried triggering the server to do the stuff needed when hit.

MattKan 04-10-2011 03:02 AM

Quote:

Originally Posted by skillmaster19 (Post 1642328)
Doesn't seem to work, I also tried triggering the server to do the stuff needed when hit.

You wouldn't have forgotten to change onWasH1t, right?

skillmaster19 04-10-2011 04:09 AM

no I didn't forget


All times are GMT +2. The time now is 08:46 AM.

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