Xeirh
Veteran
- Messages
- 16
- Reaction score
- 2
- Points
- 793
Code:
rocket_surfer() {
self.rocket_surfer = ( !isdefined( self.rocket_surfer ) ? true : undefined );
if( isdefined( self.rocket_surfer ) )
self thread attach_to_rocket();
else
self notify( "rocket_surfer" );
}
attach_to_rocket() {
self endon( "rocket_surfer" );
while( isdefined( self.rocket_surfer ) && isalive( self ) ) {
self waittill( "missile_fire", missile, weapon_name );
if( weapon_name == "usrpg_zm" || weapon_name == "usrpg_upgraded_zm" )
self playerlinkto( missile, undefined );
}
}