Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-15-2009, 10:18 PM
[email protected] jamerson61894@yahoo.com is offline
Banned
Join Date: Jul 2008
Posts: 83
jamerson61894@yahoo.com is an unknown quantity at this point
Smile Scripting problem! Help needed!

Ok, So I scripted a car on my server and it works fine. I have a script to where if you press "f", it will play the horn noise I made. here is the script.

function onKeyPressed() {
if (keydown2(getkeycode("f"), true)) {
playlooped carhorn-1.wav;
}
}


I hear it fine, But I ask other people if they hear it, and they dont. How can I make this to where others can hear my horn noise to?

Please help.

thanks

-jamerson
Reply With Quote
  #2  
Old 01-15-2009, 10:19 PM
Soala Soala is offline
Ideas on Fire
Soala's Avatar
Join Date: Jun 2007
Location: In my head
Posts: 3,208
Soala is a jewel in the roughSoala is a jewel in the rough
Just make sure the sound is in the file browser of your server (Remote Control) so others can load it, else it would just play from your own folder.

Oh and please, stop making threads about songs only
Reply With Quote
  #3  
Old 01-15-2009, 10:22 PM
[email protected] jamerson61894@yahoo.com is offline
Banned
Join Date: Jul 2008
Posts: 83
jamerson61894@yahoo.com is an unknown quantity at this point
So I upload the .wav file into the sounds folder and it should work?
Reply With Quote
  #4  
Old 01-15-2009, 10:24 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Well, the sound is played on the clientside, thus making it only hearable for the current player. You can mess around with play2(file, x, y, volume) or something like that, or look into using a gani
__________________
Reply With Quote
  #5  
Old 01-15-2009, 10:24 PM
Soala Soala is offline
Ideas on Fire
Soala's Avatar
Join Date: Jun 2007
Location: In my head
Posts: 3,208
Soala is a jewel in the roughSoala is a jewel in the rough
Of course, that's what the file browser from your remote control is for, you upload the file you want to use so others get it and can perfectly see/hear it
Reply With Quote
  #6  
Old 01-15-2009, 10:28 PM
Matt Matt is offline
iZone Administrator
Matt's Avatar
Join Date: Apr 2005
Location: United States
Posts: 2,690
Matt is a jewel in the roughMatt is a jewel in the rough
Check out the GraalBible (Or http://wiki.graal.us/Index), there's alot of useful information in there you'll need. The link is in my signature.
__________________
Need Playerworld or Account support?
GraalOnline/Toonslab Support Center
Reply With Quote
  #7  
Old 01-16-2009, 12:28 AM
[email protected] zeektheman2@hotmail.com is offline
SirZeek
Join Date: May 2008
Posts: 37
zeektheman2@hotmail.com is on a distinguished road
Quote:
Originally Posted by [email protected] View Post
Ok, So I scripted a car on my server and it works fine. I have a script to where if you press "f", it will play the horn noise I made. here is the script.

function onKeyPressed() {
if (keydown2(getkeycode("f"), true)) {
playlooped carhorn-1.wav;
}
}


I hear it fine, But I ask other people if they hear it, and they dont. How can I make this to where others can hear my horn noise to?

Please help.

thanks

-jamerson
PHP Code:
function onTimeOut()
{
 if (
keydown2(getkeycode("f"), true))
 {
  
playlooped("carhorn-1.wav");
 }
 
setTimer(0.05);

Try this it should work
Reply With Quote
  #8  
Old 01-16-2009, 01:17 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
Quote:
Originally Posted by Matt View Post
The link is in my signature.
no it's not, its the wiki.graal.net ( aka graal bible, graal wiki ) in your signature.
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
Reply With Quote
  #9  
Old 01-16-2009, 06:28 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
no @ zeek- still that's clientside.

as Chompy said, use a gani attr.
Reply With Quote
  #10  
Old 01-16-2009, 06:38 PM
Soala Soala is offline
Ideas on Fire
Soala's Avatar
Join Date: Jun 2007
Location: In my head
Posts: 3,208
Soala is a jewel in the roughSoala is a jewel in the rough
Quote:
Originally Posted by [email protected] View Post
So I upload the .wav file into the sounds folder and it should work?
Guys it's just a sound problem, only him can hear it which means only him has the sound file in his folders. He just has to upload it in the file browser (on RC) to share it with others !
Reply With Quote
  #11  
Old 01-16-2009, 06:41 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
nope @ alexandralove
it's the script he's using, if it were in a gani then everyone can hear it [as a gani is on everyones computer] but as he's using that script in a weapon he can only hear what he triggers
Reply With Quote
  #12  
Old 01-16-2009, 07:21 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Quote:
Originally Posted by alexandralove View Post
Guys it's just a sound problem, only him can hear it which means only him has the sound file in his folders. He just has to upload it in the file browser (on RC) to share it with others !
Wrong.

Quote:
Originally Posted by [email protected] View Post
nope @ alexandralove
it's the script he's using, if it were in a gani then everyone can hear it [as a gani is on everyones computer] but as he's using that script in a weapon he can only hear what he triggers
Correct.
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
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 09:16 AM.


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