Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   NPC - annoying sound by XY change (https://forums.graalonline.com/forums/showthread.php?t=87416)

FireHunter 08-15-2009 10:49 PM

NPC - annoying sound by XY change
 
Well I often played Graal without music enabled + I never payed attention to it but ...

If you change the x and y coordinate of an Image-NPC it does an anoying sound similar to the first frame of the walk gani

Any ideas of how to fix that ?

Pelikano 08-15-2009 11:15 PM

Hm...

Never heard of something like this.

cbk1994 08-15-2009 11:51 PM

How exactly are you changing it? Simply changing the variables shouldn't do this.

FireHunter 08-16-2009 12:06 AM

for example a dbNPC:

PHP Code:

function onCreated() {
  
this.image "block.png";
  
setTimer0.05 );
}

function 
onTimeout() {
  
this.+= 0.01;
  
setTimer0.05 );



Pelikano 08-16-2009 12:21 AM

Well, Serverside you should do setTimer(0.1), other than that I have no idea what the problem could be.

FireHunter 08-16-2009 12:28 AM

hmm the sleep time is not the problem in here :-/

Crow 08-16-2009 12:44 AM

Quote:

Originally Posted by FireHunter (Post 1515042)
hmm the sleep time is not the problem in here :-/

Not really, no, but the server only executes 10 frames a second, which results in a minimum sleep time of one tenth of a second.

Anyway, I know what you mean, and I guess it has something to do with the way how the walk sounds are hard coded into the client. As far as I know though, they only play for moving image npcs when they are moved serverside. I'm not sure about it, and I was not successful looking for any workarounds yet :cry:

Admins 08-16-2009 03:47 AM

Yes, npcs make a movement sound if you change the positions on server-side and the classic system is not disabled (kingdoms, zone),
you can use move() however

cbk1994 08-16-2009 04:21 AM

Quote:

Originally Posted by Stefan (Post 1515064)
the classic system is not disabled (kingdoms, zone)

Why isn't there a server option or so to do this in normal servers?

FireHunter 08-16-2009 05:28 AM

Quote:

Originally Posted by cbk1994 (Post 1515067)
Why isn't there a server option or so to do this in normal servers?

/agree

Well thx for the answers / help - didnt knowed that move(); doesnt do the annoying sound o.O ;)
But I think its more smart just putting the sound off if I want a direct position change xD

PHP Code:

temp.targetx 20// the X pos on the level
temp.targety 20// the Y pos on the level

temp.distx temp.targetx this.x;
temp.disty temp.targety this.y;

movetemp.distxtemp.disty0); 


DustyPorViva 08-16-2009 06:08 AM

Why do NPCs make a noise when moved in the first place? That stuff should have been phased out with ganis.


All times are GMT +2. The time now is 11:06 AM.

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