Results 1 to 8 of 8
  1. #1
    MSgt. Shooter Person
    Join Date
    Oct 2007
    Posts
    240

    Default How can I disable Feign Death?

    I'm looking for a way to disable Feign Death, preferably a way I can turn it on and off, but I'd also settle for a perm. way for an entire game. I've noticed when I change something on a group of pawns, certain things I change are reset when they feign and then stand back up.

    a quick example is Pawn.bCanPickupInventory, if I set it to false, they feign, stand back up, it is reset to true again.
    www.DAWGA.com

    UT3 RPG Invasion Server up, hit F10, "open dawga.com:8888" to join

  2. #2
    MSgt. Shooter Person
    Join Date
    Dec 2007
    Location
    Canada
    Posts
    38

    Cool

    I haven't tried any of this myself, but here's my guess at an answer:

    To remove Feign Death permanently, remove all bindings that call the exec FeignDeath. It will still exist in UTPawn.uc but no one will ever call it.

    To allow Feign Death to be disabled through a variable, extend UTPawn.uc so that you can override its exec function FeignDeath() (~line 4355 in UTPawn.uc). Create a boolean, e.g. bFeignDeathEnabled, and a conditional 'if' statement like so:

    Code:
    exec simulated function FeignDeath()
    {
    	if (bFeignDeathEnabled)
    	{
    		ServerFeignDeath();
    	}
    }

  3. #3
    Redeemer
    Join Date
    Nov 2007
    Posts
    1,207

    Default

    If you do end up subclassing and replacing UTPawn I would make the changes in the ServerFeignDeath() function rather than the FeignDeath() function. That way you don't need to worry about replicating your condition variable (unless you need to for some other reason), and you won't have issues where people feign death when they shouldn't because the variable hasn't replicated yet or they are cheating.

  4. #4
    MSgt. Shooter Person
    Join Date
    Oct 2007
    Posts
    240

    Default

    Sorry if it seems simple to you, but as a follow up, Lets say I make a subclass of UTPawn called MyUTPawn and make the feigndeath change there. How does this become active? Do I need to do a CheckReplacement in the mutator? I'm just not clear on how the game knows to spawn the new Pawns that are not able to feign death.
    Last edited by bushbomb; 12-24-2007 at 03:29 PM.
    www.DAWGA.com

    UT3 RPG Invasion Server up, hit F10, "open dawga.com:8888" to join

  5. #5
    Redeemer
    Join Date
    Nov 2007
    Posts
    1,207

    Default

    The pawns used in a game are determined by the DefaultPawnClass variable in the GameInfo, so you set the subclass to be used by setting your mutator to change it like so:

    Code:
    function PostBeginPlay() {
        super.PostBeginPlay();
    
        worldinfo.Game.DefaultPawnClass = Class'MyUTPawn';
    }

  6. #6
    MSgt. Shooter Person
    Join Date
    Oct 2007
    Posts
    240

    Default

    Thanks, worked perfectly with about 2 seconds of work using your help.
    www.DAWGA.com

    UT3 RPG Invasion Server up, hit F10, "open dawga.com:8888" to join

  7. #7

    Default

    Does someone have time to elaborate?
    bushbomb said that it works, but wich snippet, and where to put it?

    Yes, I'm being new and all that

  8. #8

    Default

    1.Create a new class, MyUTPawn that extends UTPawn.
    2. declare a variable bFeignDeathEnabled and then Add Daishonin's code here. then in default properties, set bFeignDeathEnabled to false.
    3. Extend UTMutator and add immortius' code in it.
    4. Compile.
    5. Play.

    Setting this mutator should now disable FeignDeath. If you want to be able to enable/disable Feign Death on the fly, you will have to add a server exec function to MyUTPawn that sets bFeignDeath to true when typed in the console.


 

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.