News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Mods > WoD Mod Pod > Ask a Coder

Reply
 
Thread Tools Display Modes
Old 29th Jun 2003, 09:31 AM   #1
Donator
Registered User
 
Join Date: Jun. 26th, 2003
Location: Vienna
Posts: 146
How does the shield work?

Sounds simple enough. I am trying to code up a modifiction of the standard shield that briefly spawns a sphere like mesh around the target when hit to give the illusion of an actually invisible shielding field surrounding the player that only becomes visible when absorbing damage. You all know star trek, you know the clichee. I'm just not satisfied with that orange shader. Problem is, I'm at a complete loss where to start. Where is the function that actually generates that damage overlay and from where is it called?
Donator is offline   Reply With Quote
Old 29th Jun 2003, 09:57 AM   #2
EvilDrWong
Every line of code elevates you
 
EvilDrWong's Avatar
 
Join Date: Jun. 16th, 2001
Location: Inside the machine
Posts: 932
xPawn.ShieldAbsorb(), but to change that youll need to make a gametype... which probably isnt what youre going for. What you could do as a cheap alternative is make a new GameRules class and in its NetDamage function spawn your translucent sphere effect if xPawn(Injured).ShieldStrength > 0
__________________
How can you challenge a perfect immortal machine?
EvilDrWong is offline   Reply With Quote
Old 29th Jun 2003, 11:11 AM   #3
Donator
Registered User
 
Join Date: Jun. 26th, 2003
Location: Vienna
Posts: 146
The 'cheap alternative' was very helpful, thanks a lot.

I still don't understand where the damage overlay is generated, since ShieldAbsorb() only does 'return damage' as I see it, no actual texture change. I'm able to generate the sphere now, so my second question would be, how do I get rid of the orange damage overlay shader?
Donator is offline   Reply With Quote
Old 29th Jun 2003, 11:49 AM   #4
EvilDrWong
Every line of code elevates you
 
EvilDrWong's Avatar
 
Join Date: Jun. 16th, 2001
Location: Inside the machine
Posts: 932
Code:
(in xPawn.ShieldAbsorb)
if (ShieldStrength > damage)
{
    ShieldStrength -= damage;
    SetOverlayMaterial( ShieldHitMat, ShieldHitMatTime, false );
    PlaySound(sound'WeaponSounds.ArmorHit',SLOT_Pain,2*TransientSoundVolume,,400); 
    return 0;
}
the bold part might be the culprit behind that. SO, what you could try doing is something of this sort in your NetDamage() to get rid of it after the fact
Code:
injured.SetOverlayMaterial(none, 0.0, false);
__________________
How can you challenge a perfect immortal machine?

Last edited by EvilDrWong; 29th Jun 2003 at 11:51 AM.
EvilDrWong is offline   Reply With Quote
Old 29th Jun 2003, 01:41 PM   #5
Donator
Registered User
 
Join Date: Jun. 26th, 2003
Location: Vienna
Posts: 146
Going to try that now. Oddly enough, I've no idea where to find those lines you mention. The ShieldAbsorb() function in the xPawn class when viewed in UnrealED only contains the line 'return damage;' for me. And even odder, when trying to export xPawn, WOTGreal crashes, period, no questions asked. Anyway, thanks, you've been a big help. Off to experimenting now...
Donator is offline   Reply With Quote
Old 29th Jun 2003, 08:15 PM   #6
EvilDrWong
Every line of code elevates you
 
EvilDrWong's Avatar
 
Join Date: Jun. 16th, 2001
Location: Inside the machine
Posts: 932
oh! here, try downloading the source straight from epic:
http://unreal.epicgames.com/Files/UT...225-Source.zip
__________________
How can you challenge a perfect immortal machine?
EvilDrWong is offline   Reply With Quote
Old 30th Jun 2003, 02:18 AM   #7
Donator
Registered User
 
Join Date: Jun. 26th, 2003
Location: Vienna
Posts: 146
Great. Now I can also see it. I really wonder why the xPawn from the sourcecode zip differs from the one I see in UEd (?!).
Donator is offline   Reply With Quote
Old 30th Jun 2003, 02:49 AM   #8
Donator
Registered User
 
Join Date: Jun. 26th, 2003
Location: Vienna
Posts: 146
injured.SetOverlayMaterial(none, 0.0, false);

does not work, by the way. Maybe the overlay's drawn before NetDamage is called.
Donator is offline   Reply With Quote
Old 30th Jun 2003, 04:15 AM   #9
Donator
Registered User
 
Join Date: Jun. 26th, 2003
Location: Vienna
Posts: 146
But it doesn't matter much as I see now, because the shield effect blocks your view anyway. Cool. Some more fiddling with materials and it's ready to rock...
Attached Images
File Type: jpg ShieldShot2.jpg (54.7 KB, 20 views)
Donator is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 01:06 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Copyright ©1998 - 2012, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer