TribesNext

Welcome, Guest. Please login or register.
Did you miss your activation email?


TribesNext >  TribesNext.com Forums >  Tribes 2 >  Mods and Customization >  Call to ELFProjectileData::(un)zapTarget at? « previous next »
Pages: [1] Print
Author Topic: Call to ELFProjectileData::(un)zapTarget at?
mHyth
Nugget²

Posts: 57

View Profile
December 25, 2010, 06:19:00 PM »
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!


---------------------------------------------------------
Obsession. The spark of Innovation!
Phantom139
Seņor Nugget

Posts: 214

View Profile WWW
1: December 26, 2010, 01:37:53 PM »
check weapTurretCode.cs, I think I remember seeing it in there.

Bio:
Founder/Creator Phantom Games Development.
Tribes 2 Modder, T3D Owner and Developer
Site:
www.phantomdev.net
mHyth
Nugget²

Posts: 57

View Profile
2: December 26, 2010, 09:04:12 PM »
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!


---------------------------------------------------------
Obsession. The spark of Innovation!
Turkeh
nil

Posts: 442

View Profile
3: December 27, 2010, 03:43:53 PM »
It may be called in the actual game engine instead of script code.

Read the FAQs!

Search before posting support requests.
Phantom139
Seņor Nugget

Posts: 214

View Profile WWW
4: December 28, 2010, 02:11:35 PM »
found them.

Code:
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

Bio:
Founder/Creator Phantom Games Development.
Tribes 2 Modder, T3D Owner and Developer
Site:
www.phantomdev.net
mHyth
Nugget²

Posts: 57

View Profile
5: December 28, 2010, 06:50:32 PM »
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.


---------------------------------------------------------
Obsession. The spark of Innovation!
keen
Seņor Nugget

Posts: 244

View Profile WWW
6: December 29, 2010, 06:36:56 PM »
Nope. Handled by the engine when an object is detected given datablock variables.

Formerly DynaBlade
Radiant Age - My Projects:
Meltdown 1 & 2, Tactical Sky Wars, MechSiege
Pages: [1] Print 
« previous next »
Jump to:  

irc.tribalwar.com / #TribesNext Powered by SMF 1.1.18 | SMF © 2005, Simple Machines
anything