Call to ELFProjectileData::(un)zapTarget at?

If the title isn't clear enough, does anyone know where ELFProjectileData::zapTarget and ELFProjectileData::unzapTarget are called? I've looked through a spreadsheet (where I got it I can't quite remember) that claims to have documented all of T2 commands and I can't find anything that (obviously) tells me where to look. I've looked through projectiles.cs and ELFGun.cs and neither tell me anything truly useful. Thanks in advance!

Comments

  • check weapTurretCode.cs, I think I remember seeing it in there.
  • I looked, but I couldn't find anything about it in there, you probably remember one of the many %*.setTarget or setTarget* lines included in there :7

    Thanks either way though!
  • It may be called in the actual game engine instead of script code.
  • found them.
    function ELFProjectileData::zapTarget(%data, %projectile, %target, %targeter)
    {
    	%oldERate = %target.getRechargeRate();
    	%target.teamDamageStateOnZap = $teamDamage;
       %teammates = %target.client.team == %targeter.client.team;
    
    	if( %target.teamDamageStateOnZap || !%teammates )
    		%target.setRechargeRate(%oldERate - %data.drainEnergy);
    	else
    		%target.setRechargeRate(%oldERate);
    
    	%projectile.checkELFStatus(%data, %target, %targeter);
    }
    
    function ELFProjectileData::unzapTarget(%data, %projectile, %target, %targeter)
    {
    	cancel(%projectile.ELFrecur);
    	%target.stopAudio($ELFZapSound);
    	%targeter.stopAudio($ELFFireSound);
    	%target.zapSound = false;
    	%targeter.zappingSound = false;
       %teammates = %target.client.team == %targeter.client.team;
    
    	if(!%target.isDestroyed())
    	{
    		%oldERate = %target.getRechargeRate();
    		if( %target.teamDamageStateOnZap || !%teammates )
    			%target.setRechargeRate(%oldERate + %data.drainEnergy);
    		else
    			%target.setRechargeRate(%oldERate);
    	}
    }
    
    projectiles.cs
  • Er, I knew about them, I meant where are they called, not defined. Like, function whatEver(%args) { %data.zapTarget(%projectile, %target, %targeter); } It probably is called in the EXE, but the list of functions I have inside weren't very explicit about it so I was wondering if anyone knew.
  • Nope. Handled by the engine when an object is detected given datablock variables.
Sign In or Register to comment.