Announcement

Collapse
No announcement yet.

UScript noob needs help on first mutator

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Found out how to decompile packages, decompiled Angel Item Physics, looked at code, realized my variables are supposed to be var _config_ etc., changed, recompiled, it works.

    Leave a comment:


  • replied
    OK, between HSoolien's code and the Unreal Wiki, this is what I have for the GUI:
    Code:
    (more old code removed)
    But my configuration GUI doesn't show up Help!
    Edit: I've now tried commenting out Super.FillPlayInfo(PlayInfo), still doesn't work.
    Edit: Resolved

    Leave a comment:


  • replied
    you can build dialogs with a open button too, but that is mutch more work

    Leave a comment:


  • replied
    The following will give you an config screen with a check box that passes a true or false back to bWhatDoIDo
    Code:
    class somemute extends mutator;
    
    var config bool bWhatDoIDo;
    var string OptionName, OptionDescription;
    
    function PostBeginPlay()
    {
         log(bWhatDoIDo);
    }
    
    static function FillPlayInfo(PlayInfo PlayInfo)
    {
         PlayInfo.AddSetting(default.RulesGroup, "bWhatDoIDo", default.OptionName, 0, 1, "Check");
    }
    
    static event string GetDescriptionText(string PropName)
    {
         if (PropName == "bWhatDoIDo")
              return default.OptionDescription;
    }
    
    defaultproperties
    {
         bWhatDoIDo=False;
         OptionName="Log True"
         OptionDescription="Logs true if checked, false if not"
    }

    Leave a comment:


  • replied
    After changing GroupName, mutator chaining works properly. So now a very simple question: how do I build configuration dialogs?

    Leave a comment:


  • replied
    Score one for the nubs!

    I resolved the error myself. Code now stands as follows:
    Code:
    (old code removed)
    Going to test chainability now! However, I still need help on the config dialog.

    Leave a comment:


  • started a topic UScript noob needs help on first mutator

    UScript noob needs help on first mutator

    OK, I wanted a mutator that would give you every weapon and infinite ammo. I decided that this would be a good time to start learning UScript (on advice), so this is what I have:

    Code:
    (old code removed)
    Here's the problems thus far:
    1.
    Analyzing...
    Parsing MutLoadout
    Compiling MutLoadout
    D:\Games\Unreal Tournament 2004\Loadout\Classes\MutLoadout.uc(100) : Error, Can't access protected variable 'Ammo' in 'Weapon'
    Compile aborted due to errors.
    Failure - 1 error(s), 0 warning(s)
    I'm guessing this means the UT2K3 tutorial I was using is outdated :cry:... so how can I actually set ammunition? (RESOLVED)
    2. Will my mutator work correctly chained? (IE if I use WoRM: Weapon Replacer along with this, will all players start with the weapons WoRM has specified?) (CHAINING NOT WORKING)
    3. How do I create a configuration dialog for configuration within UT2K4? (RESOLVED)

    Thanks!
Working...
X