![]() |
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: |
The play() command only plays the sounds for the current player. In order for other players to hear sounds, they have to be in a gani.
And please, use [ PHP][ /PHP] tags instead of code ones. :) |
yes indeed, i was speculating that. what i want to do is simply pass an integer from 1 - 16 to the gani and then the gani will play a specific wave file based on the number it was passed. so to do this i would do:
// In the instrument weapon code PHP Code:
// In the gani: PHP Code:
|
I haven't tried this, but this -should- work (gani script):
PHP Code:
PHP Code:
PHP Code:
|
No, you can't use onCreated() in a GANI script.
onCreated() will overwrite params, and onCreated() will be given no params. So I would do something like this: PHP Code:
setAni( "flute_play", "sound1.wav" ); For more advanced gani scripts, you can do PHP Code:
|
Simple.
setani("flutegani","flutesound_"this.sound); and in the gani, put a sound and use PARAM1 |
setani("flutegani","flutesound_" @ this.sound);
corrected :P |
Hmm, I put @ this.sound :( must of got removed somehow.
|
| All times are GMT +2. The time now is 04:28 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.