Results 1 to 2 of 2
  1. #1

    Question Newbie Mutator question

    Hi all,

    I haven't scripted before and I am about to start. I got some programming skills but I am totally new to unrealscript. What I want to do is create a mutator that changes this function in Pawn.uc.

    simulated function name GetDefaultCameraMode( PlayerController RequestedBy )
    {
    if ( RequestedBy != None && RequestedBy.PlayerCamera != None && RequestedBy.PlayerCamera.CameraStyle == 'Fixed' )
    return 'Fixed';

    return 'FirstPerson';
    }

    I want it to return 'ThirdPerson' instead. Very simple.

    How do I write a mutator to do a simple thing like this?

  2. #2

    Default

    I figured it out all by myself. This is my solution.

    function ModifyPlayer(Pawn Other)
    {
    if ( NextMutator != None )
    NextMutator.ModifyPlayer(Other);


    if ( Other.Controller != None && PlayerController(Other.Controller) != None )
    PlayerController(Other.Controller).SetCameraMode(' ThirdPerson');
    }


 

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.