Atr0x wrote:
pls.... i must override wp_lightningstrike variable... healt+100 on resurrect and healt+100 in lightnings shot that hit worm...
what i must override into script in scheme list script..
i try..but it get me error aspect function
to change only two value what i can do?
you need override "LightningHit" function of lightning.
As soon as lightningstrike doesn`t use any variables to add health to resurrected worms, u can override whole parts of function with adjustments.
That function also contains info how many HP will need to add to the worm.
Code:
require wp_lightningstrike;
override void PxLightningStrike::LightningHit(CGObject *obj)
{
if (obj != NullObj && obj->ClType == OC_Cross)
{
PxDeadWorm* deadworm1 = DW_M->DeadWormFromGrave(obj);
if(deadworm1 != PxDeadWorm(NullObj))
{
deadworm1->Resurrect(100);
}
}
else super;
if(obj != NullObj && obj->ClType == OC_Worm)
{
// Heal worms
CWorm *worm = CWorm(obj);
if(worm->ResurrectedByLightning == false)
{
int health = GS->Info.GetWormHealth(worm->WormTeam, worm->WormNumber);
GS->Info.SetWormHealth(worm->WormTeam, worm->WormNumber, health + 75); // becouse original script already has +25
}
}
}
this code will make resurrected worms with 100hp and add +100 hp if hit to worm.
p.s. it took me a bit of time and tests to adjust it, but its still works perfectly, as should.