Announcement

Collapse
No announcement yet.

UT3 Viper Beta 3

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

    I made a vehicle replacer code , if you wanted to use this code- it allows you (for default/ECE vehicles ony) to choose whether to replace one type, or replace all.

    class MutJ6BulldogReplacer extends Mutator
    config;

    var config string ArenaVehicleClassName;
    var class<SVehicle> ArenaVehicleClass;
    var localized string ArenaDisplayText, ArenaDescText;
    var array<string> VehicleClassNames;
    var array<int> VehicleSelection;

    function PostBeginPlay()
    {
    local ONSVehicleFactory Factory;

    ArenaVehicleClass = class<SVehicle>( DynamicLoadObject(ArenaVehicleClassName,class'Clas s') );

    if(ArenaVehicleClass != None)
    {
    foreach AllActors( class 'ONSVehicleFactory', Factory )
    {
    if ( Factory.VehicleClass == ArenaVehicleClass )
    {
    Factory.VehicleClass = class'ONSJ6Bulldog';
    log("FNORD");
    }

    else if ( Factory.VehicleClass != ArenaVehicleClass && ArenaVehicleClass == Class'BulldogJ6.FakeVehicleEntryForMenu' )
    {
    Factory.VehicleClass = class'ONSJ6Bulldog';
    log("FNORD");
    }
    }
    }

    Super.PostBeginPlay();
    }

    static function FillPlayInfo(PlayInfo PlayInfo)
    {
    local string VehicleOptions;
    local class<SVehicle> cn;
    local int i;
    local array<class<SVehicle> > VehicleClasses;

    Super.FillPlayInfo(PlayInfo);

    for (i=0;i<default.VehicleClassNames.Length;i++)
    {
    cn = class<SVehicle>( DynamicLoadObject(default.VehicleClassNames[i],class'class') );
    if (cn!=None)
    {
    VehicleClasses.Length = VehicleClasses.Length + 1;
    VehicleClasses[VehicleClasses.Length-1] = cn;
    }
    }

    for (i=0; i<VehicleClasses.Length; i++)
    {
    if (VehicleOptions != "")
    VehicleOptions $= ";";

    VehicleOptions $= VehicleClasses[i] $ ";" $ VehicleClasses[i].default.VehicleNameString;
    }

    if(class'GUI2K4.UT2K4SP_Main'.default.bEnableTC)
    VehicleOptions $= ";" $ class'OnslaughtFull.ONSGenericSD' $ ";" $ class'OnslaughtFull.ONSGenericSD'.default.VehicleN ameString;


    PlayInfo.AddSetting(default.RulesGroup, "ArenaVehicleClassName", default.ArenaDisplayText, 0, 1, "Select", VehicleOptions);
    }

    static event string GetDescriptionText(string PropName)
    {
    if (PropName == "ArenaVehicleClassName")
    return default.ArenaDescText;

    return Super.GetDescriptionText(PropName);
    }

    defaultproperties
    {
    ArenaVehicleClassName="Onslaught.ONSPRV"
    ArenaDisplayText="Choose Vehicle to replace"
    ArenaDescText="Determines which vehicle type will be replaced in the match."
    VehicleClassNames(0)="Onslaught.ONSRV"
    VehicleClassNames(1)="Onslaught.ONSPRV"
    VehicleClassNames(2)="Onslaught.ONSAttackCraft"
    VehicleClassNames(3)="Onslaught.ONSHoverBike"
    VehicleClassNames(4)="Onslaught.ONSHoverTank"
    VehicleClassNames(5)="OnslaughtBP.ONSDualAttackCra ft"
    VehicleClassNames(6)="OnslaughtBP.ONSArtillery"
    VehicleClassNames(7)="OnslaughtBP.ONSShockTank"
    VehicleClassNames(8)="OnslaughtFull.ONSMobileAssau ltStation"
    VehicleClassNames(9)="BulldogJ6.FakeVehicleEntryFo rMenu"
    GroupName="BulldogArena"
    FriendlyName="Bulldog Arena"
    Description="Replace all vehicles in map with a particular type."
    }

    Comment


      No problem 100GPing100, how good the problem is identified, I thought it was my game hehe. Maxdamage thanks for the advice, do not know you could do that, also sent thank JohnnySix, the script still do not use it because I am afraid that something was going wrong with me. one of these days it proved, I guess that worked.
      thanks for all the help, I send greetings. see ya

      Comment


        Glad you got it working.

        Comment


          Project reactivated.

          Currently initiating the process of re-writing it.

          Comment


            Progress Update

            Progress:
            » Increased Self-Destruct damage from 750 to 800.
            » Fixed gravity bug.

            To Do List:
            Self-Destruct System:
            » Possibly add "Bullseye!" announcement (direct hit on pawn or one of his child actors).
            » Possibly add "Last Second Saved!" announcement (destroyed a Viper that was boosting).

            Projectile:
            » Make the projectile's looks.


            Notes:
            I've partially fixed the bug of the projectile not dealing damage. It doesn't deal damage to vehicles though. Still need to fix that.

            Comment

            Working...
            X