View Single Post
  #4  
Old 12-23-2007, 12:08 PM
projectigi projectigi is offline
Registered User
Join Date: Jan 2004
Posts: 403
projectigi is an unknown quantity at this point
2 separated timeouts(note that -System/Attack1 is a non-existant(it isnt a weapon, npc or anything else in rc/serv))

running both timeouts:
( in this case player saying "running timeout1" + sitting all the time )

PHP Code:
//#CLIENTSIDE
function onCreated()
  {
  (
"-System/Attack1") = new TStaticVar();
  (
"-System/Attack1").onTimeout = function()
    {
    
player.chat "running timeout1";

    
setTimer0.05 );
    };
  (
"-System/Attack1").trigger"Timeout""" );
  
onTimeout();
  }
  
function 
onTimeout()
  {
    
setani"sit""" );
    
setTimer0.05 );
  } 
running only the main(in the npc itself)
( in this case player sitting all the time without saying "running timeout1" )

PHP Code:
//#CLIENTSIDE
function onCreated()
  {
  (
"-System/Attack1") = new TStaticVar();
  (
"-System/Attack1").onTimeout = function()
    {
    
player.chat "running timeout1";
  
    
//setTimer( 0.05 );
    
};
  
//("-System/Attack1").trigger( "Timeout", "" );
  
onTimeout();
  }
  
function 
onTimeout()
  {
    
setani"sit""" );
    
setTimer0.05 );
  } 
running only the "sub" timeout:
(in this case player saying "running timeout1" without sitting all the time)

PHP Code:
//#CLIENTSIDE
function onCreated()
  {
  (
"-System/Attack1") = new TStaticVar();
  (
"-System/Attack1").onTimeout = function()
    {
    
player.chat "running timeout1";
  
    
setTimer0.05 );
    };
  (
"-System/Attack1").trigger"Timeout""" );
  
//onTimeout();
  
}
  
function 
onTimeout()
  {
    
setani"sit""" );
    
setTimer0.05 );
  } 

Last edited by projectigi; 12-23-2007 at 04:32 PM..
Reply With Quote