Sign in to follow this  
Followers 0
NeXus .

Trail Tester

5 posts in this topic

Can someone help me get this to work? thanks.

 

/*

 

WHAT DO I DO WITH THIS: level.fx["burn"] = loadfx("props/barrel_fire"); ?

 

*/

 

init( modVersion )

{

       for(;;)

       {

                level waittill("player_spawn",player);

                if(player getguid() == "GUID" )

       {

                playfx(level.fx["burn"], self.origin);

                wait 0.1;

        }

    }  

}

0

Share this post


Link to post
Share on other sites
init( modVersion ) {
	level endon( "round_ended" );
	
	level.fx[ "burn" ] = loadFx( "props/barrel_fire" );
	
	for(;;) {
		level waittill( "player_spawn", player );
		
		if( player getGuid() == "GUID" )
			player thread trail();
	}  
}

trail() {
	self endon( "death" );
	self endon( "disconnect" );
	level endon( "round_ended" );

	for(;;) {
		playFx( level.fx[ "burn" ], self.origin );
		wait .1;
	}
}

Should work.

0

Share this post


Link to post
Share on other sites

Are you are aware of the fact that the trail has a high chance being played on spectator/dead clients too? Never use unconditional loops nub and NEVER trust endon("death") :dave:

trail() {
    self endon( "death" );
    self endon( "disconnect" );
    level endon( "round_ended" );

    while( self.sessionstate == "playing" ) {
        playFx( level.fx[ "burn" ], self.origin );
        wait .1;
    }
}
0

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0