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 03-25-2004, 03:20 AM
Gman4pwnu Gman4pwnu is offline
Banned
Join Date: Jan 2004
Posts: 434
Gman4pwnu is on a distinguished road
Send a message via AIM to Gman4pwnu
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?
Reply With Quote
  #2  
Old 03-25-2004, 03:35 AM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
It's good to play sounds clientside. x-x'
I don't think you can play sounds serverside, i never tried at least.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #3  
Old 03-25-2004, 06:59 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
You are supposed to use ganis, or play sounds directly on the clientside for everybody.
Reply With Quote
  #4  
Old 03-26-2004, 05:19 AM
Gman4pwnu Gman4pwnu is offline
Banned
Join Date: Jan 2004
Posts: 434
Gman4pwnu is on a distinguished road
Send a message via AIM to Gman4pwnu
should I trigger action to clientside to play sounds? will that allow everyone to hear?
Reply With Quote
  #5  
Old 03-26-2004, 05:47 AM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
You would then need to trigger every client in a loop.
Reply With Quote
  #6  
Old 03-27-2004, 12:48 PM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
clientside is your own view, so if you trigger it back to clientside from serverside only you will hear it.
__________________
V$:CONFL16T
Reply With Quote
  #7  
Old 03-27-2004, 02:13 PM
R0bin R0bin is offline
Banned
R0bin's Avatar
Join Date: Oct 2002
Location: Wales, UK
Posts: 828
R0bin is on a distinguished road
Send a message via AIM to R0bin
erm...


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



doesnt work anymore? (in a level npc)
Reply With Quote
  #8  
Old 03-27-2004, 02:38 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
I assumed he wants a clientside NPC on a certain clientside, local action to play a sound to everybody.
Reply With Quote
  #9  
Old 04-16-2004, 05:27 AM
Gman4pwnu Gman4pwnu is offline
Banned
Join Date: Jan 2004
Posts: 434
Gman4pwnu is on a distinguished road
Send a message via AIM to Gman4pwnu
a for playerscount loop?
Reply With Quote
  #10  
Old 04-16-2004, 08:30 AM
R0bin R0bin is offline
Banned
R0bin's Avatar
Join Date: Oct 2002
Location: Wales, UK
Posts: 828
R0bin is on a distinguished road
Send a message via AIM to R0bin
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.

Last edited by Loriel; 04-16-2004 at 03:42 PM..
Reply With Quote
  #11  
Old 04-16-2004, 03:45 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
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
Reply With Quote
  #12  
Old 04-16-2004, 06:48 PM
VeX_RaT_Boy VeX_RaT_Boy is offline
WannaBe Scripter
VeX_RaT_Boy's Avatar
Join Date: Aug 2002
Location: Norway
Posts: 960
VeX_RaT_Boy is on a distinguished road
Send a message via ICQ to VeX_RaT_Boy Send a message via AIM to VeX_RaT_Boy Send a message via Yahoo to 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.
__________________
-Kjetil Valen
Reply With Quote
  #13  
Old 04-16-2004, 08:05 PM
Dach Dach is offline
call me Chad, it's cooler
Dach's Avatar
Join Date: Aug 2002
Posts: 1,899
Dach is on a distinguished road
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
__________________
Scripting Documents:Old Script Documentation-Movement Tutorial
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 08:37 PM.


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