Announcement

Collapse
No announcement yet.

How to Spawn normally my modified Manta?

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

    How to Spawn normally my modified Manta?

    Hi, i'm new in this big world of Unreal and i begin to modding in UnrealScript...I known, you guys now say "oh no, another noob today", but fortunately i have enough time to learn how to scripting in UnrealScript environment. Well, as begin is not bad for me, because i successfully created a new mod written in Unrealscript

    Ok, let's see.

    I create this mod, ok, but it's possible to spawn my modified manta normally in both side (Red and Blue)? or it's possible to replace the normal manta without mess Scripting? well i tested my mod using the "summon" cheat, but it's not enough: i would like to introduce my Modified Manta in both side.

    The Question is: to normally spawn a manta in another maps is required to modify the mutbonusvehicle.uc??

    Thanks a Lot, Guys.

    #2
    Re: How to Spawn normally my modified Manta?

    I wouldn't go around using the MutBonusVehicles. It's... slightly odd, to say the least. Instead, grab a vehicle mutator somebody else made that works for only a single vehicle and modify that. There is no need to bother with any of the more complex mutators unless you have made more than one vehicle.

    Comment


      #3
      Hmmmmmmmmmm....In simply words i pick a Vehicle Mutator create by someone else and modify? ok, much later i do that. Thanks Anyway ^o^

      Comment


        #4
        Just check all the factories, if it uses a normal manta, change the VehicleClass w/e:

        I made this special check replacement function so say if its a trial map and it has custom ones, it spawns, cheecks, dedstroys it.
        Code:
        simulated function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
        {
            local Vehicle V;
            if( SVehicleFactory(Other) != None )
                if( String(SVehicleFactory(Other).VehicleClass) ~= VehicleClassName )
                    SVehicleFactory(Other).VehicleClass = ReplacementVehicle;
            if( SVehicleFactory(Other) != None && SVehicleFactory(Other).VehicleClass != ReplacementVehicle )
            {
                V = Other.Spawn(SVehicleFactory(Other).VehicleClass);
                if( V != None )
                {
                    if( V.IsA('ONSRV') )
                        SVehicleFactory(Other).VehicleClass = ReplacementVehicle;
                     V.Destroy();
                }
                else
                    Log("Error Checking Vehicle Type!");
            }
        	bSuperRelevant = 0;
        	return true;
        }
        var string VehicleClassName; // Such As: "Onslaught.ONSRV'
        var Class<Vehicle> ReplacementVehicle; // Such As: Class'MyONSRV'

        Comment


          #5
          Ok, i just check the factories who begin with the "ONS" inital? ok, got it v^ ^

          Ah, this code i put into my .uc file of my modified manta?? For the normal manta, yes, i create the vehicle based on normal manta (i copied the original files and modified), but for use this i use the "Summon" Cheat, because i doesn't fit the Modified manta in order to spawn it in all maps. ^^'

          Anyway, thanks a lot. I will use your code after your answer. ^o^!

          Edit: ehm, i don't have a trial map because i'm not still capable to create a map very well, but i just try. v^ ^

          Comment


            #6
            no that code is part of the mutator you use to change the manta spawns in the map ur playin to ur mantas

            Comment


              #7
              Originally posted by ^::B!G-A::
              no that code is part of the mutator you use to change the manta spawns in the map ur playin to ur mantas
              Ah, sorry for the ignorance, i can't understand often (because i'm italian) ^_^v

              So, i finally understand, i hope....i put that code in a .ucl file? (in other words, i create .ucl file and put it this code, right?)

              Comment


                #8
                no you need a .uc file as in,
                MyMantaMutator.uc (For example)

                Should look somthing like this:
                Code:
                class MyMantaMutator extends Mutator;
                
                var string VehicleClassString; // Vehicle to Replace
                var name VehicleClassName; // Vehicle ClassName to Replace
                var Class<Vehicle> ReplacementVehicle; // Replacement Vehicle
                
                simulated function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
                {
                    local Vehicle V;
                    if( SVehicleFactory(Other) != None )
                        if( String(SVehicleFactory(Other).VehicleClass) ~= VehicleClassString )
                            SVehicleFactory(Other).VehicleClass = ReplacementVehicle;
                    if( SVehicleFactory(Other) != None && SVehicleFactory(Other).VehicleClass != ReplacementVehicle )
                    {
                        V = Other.Spawn(SVehicleFactory(Other).VehicleClass);
                        if( V != None )
                        {
                            if( V.IsA(VehicleClassName) )
                                SVehicleFactory(Other).VehicleClass = ReplacementVehicle;
                             V.Destroy();
                        }
                        else
                            Log("Error Checking Vehicle Type!");
                    }
                	bSuperRelevant = 0;
                	return true;
                }
                
                defaultproperties
                {
                     ReplacementVehicle=Class'MyONSHoverBike'
                     VehicleClassString="Onslaught.ONSHoverBike"
                     VehicleClassName=ONSHoverBike
                     GroupName="VehicleArena"
                     FriendlyName="My Manta Replacement"
                     Description="Replace the Mantas with this new one."
                }

                Comment


                  #9
                  Ahhhhhhhhh!!!!! That's why my .ucl file doesn't appear my manta o.o!! I need to read again Unrealscript tutorials.

                  Well, this code is valid for all vehicle who have intention to replace instead of my manta?? In this case, thanks!! The Next time i will do this myself

                  For any help i don't hesitate to contact u via pm if have another problem with this code. ^ ^

                  Thanks a lottttt >O<!! *-*

                  Comment


                    #10
                    Sorry for the double post but i have a question for the manta, of course.

                    But the code posted by air i simply put in a .uc file without change another code and change only the classname?

                    thanks ^^

                    Comment

                    Working...
                    X