View Single Post
  #5  
Old 07-14-2007, 06:36 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
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:
SCRIPT
if (created)
{
  
playparams[0] );
}
SCRIPTEND 
and then do
setAni( "flute_play", "sound1.wav" );

For more advanced gani scripts, you can do
PHP Code:
if ( created )
{
  
this.args params;
  
startScript();
}
function 
startScript()
{
  
// Now params is in this.args
  
doSomething();

__________________

Last edited by cbk1994; 07-14-2007 at 06:37 PM.. Reason: typo
Reply With Quote