Results 1 to 8 of 8
  1. #1
    MSgt. Shooter Person
    Join Date
    Nov 2007
    Location
    U.K
    Posts
    366

    Default xPawn - Changing UDamageWeaponMaterial

    I'm wanting to change the udamage weapon material, I managed to track this down to being in the xPawn class, the area of code I need to change I think is this (specifically the default properties),

    Code:
    function EnableUDamage(float amount)
    {
        UDamageTime = FMax(UDamageTime, Level.TimeSeconds+amount);
        ClientSetUDamageTime(UDamageTime - Level.TimeSeconds);
        if ( UDamageTimer == None )
            UDamageTimer = Spawn(class'UDamageTimer',self);
        UDamageTimer.SetTimer(UDamageTime - Level.TimeSeconds - 3,false);
        LightType = LT_Steady;
        bDynamicLight = true;
        SetWeaponOverlay(UDamageWeaponMaterial, UDamageTime - Level.TimeSeconds, false);
    }
    
    defaultproperties
    {    
        UDamageWeaponMaterial=Material'XGameShaders.PlayerShaders.WeaponUDamageShader'
    }
    Is there a way I can use modify player to do this since I do not fancy making a custom xPawn just to change this little area of code, if so, how would I go about this?
    Last edited by AZ-{OVGY}; 03-31-2008 at 04:51 PM.
    http://ovgyclan.com

    My Muts-
    Revival Combo, Loaded Shock Rifle
    Dont help others because others have helped you,help others because its the right thing to do!!!

  2. #2
    Redeemer
    Join Date
    Aug 2004
    Location
    Netherlands
    Posts
    1,677
    Gamer IDs

    Gamertag: Jrubzjeknf

    Default

    Change the default property.

    Class'xPawn'.default.UDamageWeaponMaterial = Material'yourMaterial';
    My Work: MantarunAssist - TeamSpecificActors_v2 - UT2k4ScoreRecovery_v3

    Quote Originally Posted by rhiridflaidd View Post
    I remember when I first saw a cicada in-game and had a shock vs cicada duel (I had the shock.)

    The shock did nothing, and the cicada couldn't hit me no matter how he tried. We both walked\flew away bored after a while.

  3. #3
    MSgt. Shooter Person
    Join Date
    Nov 2007
    Location
    U.K
    Posts
    366

    Default

    Cool thanks, I used,

    Code:
    event PostBeginPlay()
    {
      Class'xPawn'.default.UDamageWeaponMaterial = Material'MyMaterial';
    }
    Works perfect now. Although I can't seem to find a way to change the purple glow around the player when they have UDamage, does anybody know where it is?
    Last edited by AZ-{OVGY}; 04-01-2008 at 06:07 PM.
    http://ovgyclan.com

    My Muts-
    Revival Combo, Loaded Shock Rifle
    Dont help others because others have helped you,help others because its the right thing to do!!!

  4. #4
    MSgt. Shooter Person
    Join Date
    Dec 2007
    Posts
    82

    Default

    a way to change the purple glow around the player when they have UDamage
    xPawn.EnableUDamage()
    Code:
    function EnableUDamage(float amount)
    {
        UDamageTime = FMax(UDamageTime, Level.TimeSeconds+amount);
        ClientSetUDamageTime(UDamageTime - Level.TimeSeconds);
        if ( UDamageTimer == None )
    		UDamageTimer = Spawn(class'UDamageTimer',self);
    	UDamageTimer.SetTimer(UDamageTime - Level.TimeSeconds - 3,false);
    	LightType = LT_Steady;
    	bDynamicLight = true;
        SetWeaponOverlay(UDamageWeaponMaterial, UDamageTime - Level.TimeSeconds, false);
    }
    
    =========== snip ===========
    defaultProperties
    {
        --snip--
        LightBrightness=255
        LightHue=204
        LightSaturation=0
        LightRadius=3
        --snip--
    }
    So... until/unless UDamage is active for a pawn, Pawn.LightType = LT_None
    (the property is changed to LT_Steady while UDamage is active, and is reset to LT_None afterward)

    If your mutator calls ModifyPawn() and sets LightBrightness=0
    that should result in the UDamage glow being suppressed
    After the game, king and pawn are returned to the same box.

  5. #5
    Redeemer
    Join Date
    Aug 2004
    Location
    Netherlands
    Posts
    1,677
    Gamer IDs

    Gamertag: Jrubzjeknf

    Default

    Or just use default properties again, which effectively should do the same thing.
    My Work: MantarunAssist - TeamSpecificActors_v2 - UT2k4ScoreRecovery_v3

    Quote Originally Posted by rhiridflaidd View Post
    I remember when I first saw a cicada in-game and had a shock vs cicada duel (I had the shock.)

    The shock did nothing, and the cicada couldn't hit me no matter how he tried. We both walked\flew away bored after a while.

  6. #6
    MSgt. Shooter Person
    Join Date
    Nov 2007
    Location
    U.K
    Posts
    366

    Default

    Sorry, I should have been more specific. Is there a way to change it from a purple glow to say, a green glow? I cannot seem to find anything for light colour.
    Last edited by AZ-{OVGY}; 04-02-2008 at 06:45 AM.
    http://ovgyclan.com

    My Muts-
    Revival Combo, Loaded Shock Rifle
    Dont help others because others have helped you,help others because its the right thing to do!!!

  7. #7
    Redeemer
    Join Date
    Aug 2004
    Location
    Netherlands
    Posts
    1,677
    Gamer IDs

    Gamertag: Jrubzjeknf
    My Work: MantarunAssist - TeamSpecificActors_v2 - UT2k4ScoreRecovery_v3

    Quote Originally Posted by rhiridflaidd View Post
    I remember when I first saw a cicada in-game and had a shock vs cicada duel (I had the shock.)

    The shock did nothing, and the cicada couldn't hit me no matter how he tried. We both walked\flew away bored after a while.

  8. #8
    MSgt. Shooter Person
    Join Date
    Nov 2007
    Location
    U.K
    Posts
    366

    Default

    Sweet, I got it fixed now, thanks.
    http://ovgyclan.com

    My Muts-
    Revival Combo, Loaded Shock Rifle
    Dont help others because others have helped you,help others because its the right thing to do!!!


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.