PDA

View Full Version : shield buster


Donator
30th Jun 2003, 02:52 PM
Any creative ideas how to code a splash damage effect that instantly destroys your shield, but leaves the victim's health completely (or pretty much) unharmed? I basically need a routine that accompanies the usual HurtRadius() command and sets the shield of all targets within hurt radius to zero, before actually doing damage.

Smoke39
30th Jun 2003, 02:59 PM
I think ShieldStrength in Pawn is the variable you want.

Donator
6th Jul 2003, 06:16 AM
Well, it's no problem to accomplish if I modify the NetDamage function of my shield mutator, but that doesn't satisfy me really. I would rather want the code to be part of the weapon that caused the damage, if that's possible.

EvilDrWong
6th Jul 2003, 02:14 PM
Well, in that case youd have to redo HurtRadius and stick it either in your weaponfire (for instant hit type weapons) or your projectile.

Donator
7th Jul 2003, 10:49 AM
HurtRadius is a final function, so that doesn't work.

Donator
7th Jul 2003, 11:12 AM
Nevermind. Finally got it to work maybe 5 minutes after posting this :p
So expect a supershield-busting, EMP grenade lobbing Combat Mortar in the next beta of Arkon Weapons.

Donator
12th Jul 2003, 10:03 AM
I'm a bit at a loss again. How would a mutator look like that allows me to modify default properties of the xPawn class (shield overlay and hit sounds in particular)? My idea was to write a mutator with an AllActors call in the PostBeginPlay function, something like

foreach AllActors(class'xPawn')
{
default.ShieldStrengthMax=NewShieldMaxStrength;
}

but since it won't work I'd be thankful if somebody found the time to point out what variables have to be handed to AllActors to return all players (which are xPawns, I think, or not?)

Donator
12th Jul 2003, 11:56 AM
With config menu added, Arkon Shields Beta 1 has entered final test phase...

Smoke39
12th Jul 2003, 04:04 PM
I'm a bit at a loss again. How would a mutator look like that allows me to modify default properties of the xPawn class (shield overlay and hit sounds in particular)? My idea was to write a mutator with an AllActors call in the PostBeginPlay function, something like

foreach AllActors(class'xPawn')
{
default.ShieldStrengthMax=NewShieldMaxStrength;
}

but since it won't work I'd be thankful if somebody found the time to point out what variables have to be handed to AllActors to return all players (which are xPawns, I think, or not?)
If you wanted to do it like that, you should do this:

local xPawn p;

foreach DynamicActors( class'xPawn', p )
p.Default.ShieldStrengthMax = NewShieldMaxStrength;

But I don't think that would work. You might wanna do something more like this:

function bool CheckReplacement( Actor Other, out byte bSuperRelevant )
{
bSuperRelevant = 0;
if ( Other.IsA('xPawn') )
xPawn(Other).ShieldStrengthMax = NewShieldMaxStrength;

return true;
}

Maybe check the xPawn's current ShieldStrengthMax to keep it from constantly setting and resetting the variable for everyone, but I haven't had a trmendous amount of luck with adding if's to that function.

There may be a better way. I'm not much of a mutator maker myself. :p

Donator
12th Jul 2003, 05:39 PM
Thanks a lot. Though I didn't have any luck with the ShieldMax yet I still found a way to get rid of the redundant orange shield overlay at last. Unfortunately the shield hit sound is also directly called, not via a default variable. Ah well, bad luck.

As additional thank you here's a new screenshot, with much improved quality.