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";
setTimer( 0.05 );
};
("-System/Attack1").trigger( "Timeout", "" );
onTimeout();
}
function onTimeout()
{
setani( "sit", "" );
setTimer( 0.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", "" );
setTimer( 0.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";
setTimer( 0.05 );
};
("-System/Attack1").trigger( "Timeout", "" );
//onTimeout();
}
function onTimeout()
{
setani( "sit", "" );
setTimer( 0.05 );
}