Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-15-2009, 10:49 PM
FireHunter FireHunter is offline
TGraalScripter
Join Date: Sep 2007
Location: this.country = "Germany";
Posts: 24
FireHunter is on a distinguished road
Question 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 ?
Reply With Quote
  #2  
Old 08-15-2009, 11:15 PM
Pelikano Pelikano is offline
Registered User
Pelikano's Avatar
Join Date: Oct 2008
Posts: 1,133
Pelikano has a little shameless behaviour in the past
Hm...

Never heard of something like this.
Reply With Quote
  #3  
Old 08-15-2009, 11:51 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
How exactly are you changing it? Simply changing the variables shouldn't do this.
__________________
Reply With Quote
  #4  
Old 08-16-2009, 12:06 AM
FireHunter FireHunter is offline
TGraalScripter
Join Date: Sep 2007
Location: this.country = "Germany";
Posts: 24
FireHunter is on a distinguished road
for example a dbNPC:

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

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

Reply With Quote
  #5  
Old 08-16-2009, 12:21 AM
Pelikano Pelikano is offline
Registered User
Pelikano's Avatar
Join Date: Oct 2008
Posts: 1,133
Pelikano has a little shameless behaviour in the past
Well, Serverside you should do setTimer(0.1), other than that I have no idea what the problem could be.
Reply With Quote
  #6  
Old 08-16-2009, 12:28 AM
FireHunter FireHunter is offline
TGraalScripter
Join Date: Sep 2007
Location: this.country = "Germany";
Posts: 24
FireHunter is on a distinguished road
hmm the sleep time is not the problem in here :-/
Reply With Quote
  #7  
Old 08-16-2009, 12:44 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by FireHunter View Post
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
Reply With Quote
  #8  
Old 08-16-2009, 03:47 AM
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
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
Reply With Quote
  #9  
Old 08-16-2009, 04:21 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Stefan View Post
the classic system is not disabled (kingdoms, zone)
Why isn't there a server option or so to do this in normal servers?
__________________
Reply With Quote
  #10  
Old 08-16-2009, 05:28 AM
FireHunter FireHunter is offline
TGraalScripter
Join Date: Sep 2007
Location: this.country = "Germany";
Posts: 24
FireHunter is on a distinguished road
Quote:
Originally Posted by cbk1994 View Post
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); 

Last edited by FireHunter; 08-16-2009 at 05:49 AM..
Reply With Quote
  #11  
Old 08-16-2009, 06:08 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Why do NPCs make a noise when moved in the first place? That stuff should have been phased out with ganis.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 11:46 PM.


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