View Single Post
  #9  
Old 01-20-2011, 09:58 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Fulg0reSama View Post
Big issue of GS1 and GS2 mixup
Now if you want everyone to hear it a simple way to do this is by a class(not the best but its simple) (I try to give simple answers not most efficient. Someone feel free to correct me)

Put this in a level.
PHP Code:
function onPlayerEnters()
{
join "classname";

This is incorrect. The proper way to do it is:

PHP Code:
function onCreated() {
  
this.join("classname");

The way you were using join was a weird mixture of GS1 and GS2 that probably wouldn't have worked in either language, and there's no reason to join it in the onPlayerEnters function.

Quote:
PHP Code:
//#CLIENTSIDE
function onCreated()
{
  
setTimer(0.01);
  
onTimeOut();
}
function 
onTimeOut()
{
  
play ("stef12.mid");
  
setTimer(0.01);

There is no excuse for using a timeout here. Also, don't put spaces before functions like you did with play.

Quote:
Originally Posted by Liberated View Post
or you just make it serverside instead of clientside?
play and playlooped are clientside functions.

Quote:
Originally Posted by ffcmike View Post
What's wrong with:

PHP Code:
//#CLIENTSIDE
function onPlayerEnters(){
  
playlooped("stef12.mid");

This is the proper way to do it.
__________________
Reply With Quote