Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   sounds that everyone can hear without gani (https://forums.graalonline.com/forums/showthread.php?t=51937)

Gman4pwnu 03-25-2004 03:20 AM

sounds that every1 can hear without gani
 
Im wondering how I can serverside sounds in a level npc. I tried play serverside but it doesn't work. Idea's?

osrs 03-25-2004 03:35 AM

It's good to play sounds clientside. x-x'
I don't think you can play sounds serverside, i never tried at least.

Loriel 03-25-2004 06:59 PM

You are supposed to use ganis, or play sounds directly on the clientside for everybody.

Gman4pwnu 03-26-2004 05:19 AM

should I trigger action to clientside to play sounds? will that allow everyone to hear?

Loriel 03-26-2004 05:47 AM

You would then need to trigger every client in a loop.

WanDaMan 03-27-2004 12:48 PM

clientside is your own view, so if you trigger it back to clientside from serverside only you will hear it.

R0bin 03-27-2004 02:13 PM

erm...


//#CLIENTSIDE
if (created) play sound.wav;



doesnt work anymore? (in a level npc)

Loriel 03-27-2004 02:38 PM

I assumed he wants a clientside NPC on a certain clientside, local action to play a sound to everybody.

Gman4pwnu 04-16-2004 05:27 AM

a for playerscount loop?

R0bin 04-16-2004 08:30 AM

I suppose you could make a weapon

NPC Code:
//#CLIENTSIDE
if (actionsound) {
play #p(0);
}



and anotherone

NPC Code:
//#CLIENTSIDE
if (weaponfired) {
for (i=0;i<playerscount;i++) {
triggeraction players[i].x+1.5,players[i].y+1.5,sound,#c;
}
}



then if you said like stef21.mid then fired the weapon everyone would hear the sound, but meh.

Loriel 04-16-2004 03:45 PM

I still would prefer the use of ganis :\
If a player is lagged, the triggeractions will not even hit, and such a cumbersome workaround is a hack anyway :p

VeX_RaT_Boy 04-16-2004 06:48 PM

I got a weapon with a timeout loop, and it checks if !the string client.string is empty. If it ain't it will play that. Serverside I do a for playerscount loop, and set the string..

I don't use this a lot though, I got ganis for most of that stuff.

Dach 04-16-2004 08:05 PM

Quote:

Originally posted by VeX_RaT_Boy
I got a weapon with a timeout loop, and it checks if !the string client.string is empty. If it ain't it will play that. Serverside I do a for playerscount loop, and set the string..

I don't use this a lot though, I got ganis for most of that stuff.

doesn't get rid of the problem of sending sounds to every player in response to one player's action (you still have to send that info to every player, and that is the problem)

Just make an empty gani (put a blank image in there so it doesn't default to idle :\ ) and have it play it's params in ganiscript, then use that for any sound you want to send to every other player, there isn't much need to find a workaround for something that works just fine


All times are GMT +2. The time now is 02:44 PM.

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