Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Old Scripting Engine (GS1)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-09-2007, 11:32 PM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
Exclamation Jukebox help

I'm by no means a scripter, but I did make this NPC. It's your basic jukebox. Only plays one song at a time, simple commands, and all that stuff.

The problem I'm having is that I expected everybody to be able to hear the music being played, but so far, only the person who started the music can hear it. How would I go about making it so EVERYONE can hear the music?

PHP Code:
if (playertouchsme) {
  
toweapons Jukebox;
}

if (
weaponfired) {
  
say2 "/play url" to play#b
  
"/stop" to stop#b
  
url must end in mp3/wav/midi;
}

if (
playerchats){
  if(
startswith(/play,#c)) {
    
tokenize #c;
    
play #t(1);
    
setplayerprop #c,;
  
}
}

if (
playerchats){
  if(
strequals(#c,/stop)){
    
stopmidi;
    
setplayerprop #c,;
  
}

PS:
I know. GS1 = ew (in the words of Inverness)

Last edited by LoneAngelIbesu; 07-10-2007 at 12:09 AM..
Reply With Quote
  #2  
Old 07-10-2007, 04:06 AM
theHAWKER theHAWKER is offline
**FLIP OUT**
theHAWKER's Avatar
Join Date: Mar 2006
Location: canada, vancouver
Posts: 768
theHAWKER is an unknown quantity at this point
dose the music actualy play though?

and if u wanted it to play for everyone you would need systems, and stuff.
but i think that it would only resalt in music being played when people wont want it to...
__________________
**FLIP OUT**
Reply With Quote
  #3  
Old 07-10-2007, 04:15 AM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
Yes, it works perfectly, but only for the person PLAYING the music.
Reply With Quote
  #4  
Old 07-10-2007, 04:52 AM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
Quote:
Originally Posted by LoneAngelIbesu View Post
Yes, it works perfectly, but only for the person PLAYING the music.
Well duh. >.<
You gotta do a triggeraction to the server, and then to the client of people in the level (or use a gani script) to play it for everyone.
__________________
What signature? I see no signature?
Reply With Quote
  #5  
Old 07-10-2007, 08:40 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
You said 'everyone' so I assume you are creating this on a server. Thus DO NOT use toweapons ;. Have a nat create it in RC and use addweapon() instead.
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 10:25 PM.


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