Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-14-2007, 02:35 AM
Cherrykao Cherrykao is offline
Banned
Join Date: Apr 2007
Posts: 37
Cherrykao is on a distinguished road
music instrument

I scripted a music instrument and when i play it, i can hear it, but other people in the level can't hear it. so my question is how can I make it so that others can hear the sounds from the music instrument too?

here's a part of my script:
NPC Code:

// flute1 is idle gani and flute2 is the animation gani when player plays the flute

//#CLIENTSIDE
function onWeaponFired() {
this.mode = 1;
this.count = 10;
disabledefmovement();
setani flute1,;
setTimer(0.05);
}

function onTimeout() {
if (this.mode == 1) {
// Quit
if (keydown(6)) {
setani idle,;
enabledefmovement();
this.mode = 0;
}
if (keydown(1)) {
setani flute2,;
if (keydown(4)) {
play("flute9.wav");
}
else if (keydown(5)) {
play("flute5.wav");
} else {
play("flute1.wav");
}

// some more codes here...

setTimer(0.05);
}
}

Reply With Quote
 


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 03:36 PM.


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