Announcement

Collapse
No announcement yet.

How to spwan Vehicles

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

    How to spwan Vehicles

    hey,

    i'm searching for a Tut. Wich explaine how i spwan my own vehicles.

    thx

    jamF

    #2
    to summon them for testing use:
    summon package.vehicleclass

    If you want a facotry for mappers, extend an ONSVehcile Factory like so:
    Code:
    class MyVecFactory extends ONSVehicleFactory;
    
    DefaultProperties
    {
        Mesh=Mesh'mymeshpackage.mymesh'
        VehicleClass=class'myvecpackage.myvec'
        RedBuildEffectClass=class'myvecbuildeffectRed'
        BlueBuildEffectClass=class'myvecbuildeffectBlue'
    }
    You can use built in vehicle build effects of your vehicle size for the build effects...

    If you want a mut to replace a certain vec with your vec:
    Code:
    class myvecmut extends Mutator;
    
    function PostBeginPlay()
    {
        local ONSVehicleFactory Factory;
    
        foreach AllActors( class 'ONSVehicleFactory', Factory )
        {
            if (Factory.VehicleClass == class'Onslaught.ONSAttackCraft')
                Factory.VehicleClass = class'myvecpackage.myvec';
        }
    
        Super.PostBeginPlay();
    }
    
    defaultproperties
    {
        GroupName="MyVec"
        FriendlyName="MyVec Replacer"
        Description="Replace all raptors in map with my vec."
    }

    Comment


      #3
      What's your goal in spawning vehicles? I coded a menu that lets me pick any vehicle loaded and pick any player in the game and it spawns a vehicle next to them (and if its something like the spacefighters it puts them in it).

      Are you looking spawn a vehicle *during* game play, or define a spot *prior* to game play? If you just want to replace one vehicle with another, see the post just above this one.

      Comment


        #4
        Hsoolien,

        If you want a facotry for mappers, extend an ONSVehcile Factory like so:

        code:
        class MyVecFactory extends ONSVehicleFactory;

        DefaultProperties
        {
        Mesh=Mesh'mymeshpackage.mymesh'
        VehicleClass=class'myvecpackage.myvec'
        RedBuildEffectClass=class'myvecbuildeffectRed'
        BlueBuildEffectClass=class'myvecbuildeffectBlue'
        }

        I think this is exactly what I have been looking for. I have downloaded the Gorilla Hover Craft and it only contains a brief readme, and a *u file.

        This is mainly an SVehicle. It does not have an ONslaught Vehicle Factory, so I must create my own. My question is, were do I place this code to make this gorilla show up under the ONS vehicle factory? I think I can fill in the blanks of your code ok. This will be my first time attempt in doing this.

        OH almost forgot. It says in the readme that I need to include in my ut2004.ini under "ServerPackages" to include 3 more packages. Do I really need to do this if I create my own */ONSVehicleFactory?

        What I want to do with all these custome made vehicles I find on the net is to utilize them in my map as Factories and not mutators.

        Your help will be appreciated.

        Comment


          #5
          Any packages used in a map (as far as I know) don't need to be put in the server packages


          I imagine your using UED, whcih makes things a little harder (and I'm not 100% on how to do it).

          You subclass ONSVehicleFactory (rightclick on it then select new), set the package to MyLevel, and then when the script editor is up, I belive type EditDefaults in the command line, this will bring up an actor property box, where you change the items I listed to be what the Gorilla uses (if you open the Gorilla .u in UEd you should be able to find most of theinformation)

          Comment


            #6
            Ok, This is what I did. But I get error.

            //================================================== ===========================
            // Gorillab001VehicleFactory.
            //================================================== ===========================
            class Gorillab001VehicleFactory extends ONSVehicleFactory
            placeable;

            DefaultProperties
            {
            Mesh=Mesh'ONSGorilla.Gorilla''
            VehicleClass=class'GorillaB001.ONSGorilla'
            RedBuildEffectClass=class'GorillaTex.GorillaTextur e'
            BlueBuildEffectClass=class'GorillaTex.GorillaTextu re'
            }

            //==END OF SCRIPT


            ERROR MESSAGE: error in Gorillab001VehicleFactory, Line 6: Unexpecte 'DefaultProperties'

            Now I went to the Actor Directory:

            Pawn>Vehicle>SVehicle>ONSVehicle>ONSHoverCraft>ONS Gorilla


            Since this is the only location in the Actor Properites browser I can select the Gorilla vehicle and actually place it in the map, I highlighted ONSGorilla and placed it in the map so I could then select it and bring up its' properties. This is the only way I knew how to possibly get the actual:

            RedBuildEffectClass=
            BlueBuildEffectClass=

            I did a search for this in the Gorilla's *u file and notheing showed up.

            Now once I placed the Gorilla hover craft in my map, I didn't actually see the RedBuildEffectClass= or the blue one, but I did notice RedSkin & BlueSkin.

            Now, since GorillaB001.ONSGorilla is the VehicleClass, shouldn't this be the same for RED & BLUE BuildEffectClass? IF not I don't know were to get the two. because obviouse setting the Two "BuildEffectClass" to a texture is incorrect, I would assume.

            I opened up a regular ONSlaught Vehicle and took a look at the script and this is all that was there for the Manta:

            //-----------------------------------------------------------
            //
            //-----------------------------------------------------------
            class ONSHoverCraftFactory extends ONSVehicleFactory;

            So, I'm kinda lost here. I Could use a little help.

            Comment


              #7
              uhh i dont see ne thing rong, place the whole script if it isnt that big

              [EDIT[
              I see it
              Mesh=Mesh'ONSGorilla.Gorilla'' <-- extra ' and called rong

              Make it:
              Mesh=SkeletalMesh'ONSGorilla.Gorilla' its SkeletalMesh if i spelt it right

              Comment


                #8
                The problem is if you're using UEd to do this, you can't type up the defualt properties yourself, you have to use the editdefault console command, to bring up the actor properties window and change the settings there:

                From http://wiki.beyondunreal.com
                EditDefault Class=<classname>:
                Displays an editable property sheet for the default values of the given class.

                Comment


                  #9
                  BIG-A ,

                  I think you might be right here. Coarse I don't know much about UNreal script, but I do remember deleting out SkeletalMesh, why I dont know why I did it, but I said to myself I need to remember it was there and completely forgot about it. :cry:

                  The way I found it, I think I mentioned it before,but I simply placed a pawn of the Gorilla in the map, rightclicked to get its properties there. Thats were I actually found: SkeletalMesh'ONSGorilla.Gorilla'



                  Let me give it a shot

                  One question: When I compile do I do a compile "all" or just compile this one script? And exactly what happens when I compile? I know since mypackage is "MyLevel" I know its coded only in the map, but I would like to also update the Gorillab001.u file too! if its possible?

                  now.[IMG]http://members.***.net/vynum/img/skeletalmeshONSGorilla.gif[/IMG]

                  Comment


                    #10
                    Ok I got it, with the help of Geodav, thanks

                    This was the correct code to use to extend the Gorilla Hover Craft into the ONSVehicleFactory So map makers can include it in their ONS maps:

                    Code:
                    
                    //-----------------------------------------------------------
                    //
                    //-----------------------------------------------------------
                    class ONSGorillaFactory extends ONSVehicleFactory;
                    
                    defaultproperties
                    {
                         RedBuildEffectClass=Class'Onslaught.ONSHoverBikeBuildEffectRed'
                         BlueBuildEffectClass=Class'Onslaught.ONSHoverBikeBuildEffectBlue'
                         VehicleClass=Class'Gorilla.ONSGorilla'
                         Mesh=SkeletalMesh'ONSGorilla.Gorilla'
                    }
                    With the code above anyone can extend their own vehicle into the:
                    ONSVehicleFactory. Just replace whats in aqua with your own relavent code compile and your done.

                    One note: I did not compile this into "MyLevel". I compiled it to the *u file so I can distribute it via redirect service so others may download the U file into their cache folder. I am still waiting on Wicked Penguin to respond before I decide to upload the new *u file to a redirect service. The file nameing convention will obvisously have to be changed so, If I don't here from WP soon and if it comes time to release my map I will have to create a new *u file for redirect purposes only.

                    Comment


                      #11
                      This rocks guys...

                      I'm so ashamed I don't have time to support my own vehicles

                      Comment


                        #12
                        by WickedPenguin I'm so ashamed I don't have time to support my own vehicles
                        Well, for what it's worth I understand how you feel...! I've got to take some time off from gaming/modding myself now - this is as of last Saturday - for family and work...

                        ...But I'll try to stay around the forums & chat here or there. As for this thread's subject, you can edit defaultproperties of a custom-created factory just by right-clicking the newly-compiled actor in the Actor Browser, instead of having to type it in the console area.

                        And, I'm glad to see that WickedPenguin gives the :up: for the addition of the factory. Vynum, or WP, are you then distributing this new .u file for the Gorilla? In what spare time I have left, I'm creating a thread on my site to index the downloads of various user-made vehicles (Since UTvehicles.com is no more). I'll put it up there, and host the file on my site (I'm doing that for any that I can't find working DL links for).

                        Let me know --

                        Comment


                          #13
                          my problem:

                          i create a new vehicle from scratch. i can spawn it, but it stays in the air and not on the ground.

                          another problem is, that the vehicle don't move. (due to it's stays in the air??)

                          Comment


                            #14
                            Yo Wicked Penguin, wuz up? Did you read my emails? hope so if not nuttin hurt.

                            Hey, I'm going to send you a update package with all info so you want be lost. Nothing major was changed in the *UC's. All info along with the newly compiled version of the Hover Craft will be sent to your email.

                            ALSO:

                            Winkyboy,

                            I have fixed AirPowerIII and UTNavy2004. They both now work with ONSlaught and updated to work with the latest UTPatch V 3355.

                            I'm presently in corrispondence with Monarch and will be sending all his updates as well too. AirPower III version will remain the same but the name will have to be changed. UTNavy2004 however is updated to version 2005.

                            NEW NAMES:

                            AirpowerIIIa
                            UT2005Navy

                            To install simply install over your exsisting one.

                            IMPORTANT MAP MAKERS: BEFORE YOU UPDATE TO VYN-AirPowerIII and VYN-UTNavy2005 YOU MUST OPEN UP ANY MAP YOU HAVE CREATED WITH THE OLDER VERSIONS AND REMOVE ALL VEHICLES OR OTHERWIZE YOU WILL NOT BE ABLE TO OPEN THEM UP ANYMORE AND IF YOU DON'T HAVE BACKUPS YOUR MAPS ARE TOAST UNLESS YOU REINSTALL THE OLDER VERSIONS JUST TO GET YOUR MAP OPEN.

                            REMOVE ALL NAVAL & AIRCRAFT, REBUILDALL, SAVE, EXIT UED, THEN APPLY THE UPDATED VERSIONS.


                            IMPORTANT TO UT2K4 COMMUNITY: IF ANYONE HAS ANY MAP DOWNLOAD INTO CACHE, OR EVEN INSTALLED INTO YOUR MAP DIRECTORY AND YOU CONNECT TO A SERVER WITH AN UPDATED MAP WITH THESE VERSIONS OF VYN-AIRPOWERIII AND VYN-UTNAVY2005 IM AFRAID YOU MIGHT CRASH. YOU MAY STILL CONNECT TO OTHER SERVERS RUNNING THE SAME "VERSION MOD & MAP" YOU HAVE. BUT IF A MAP MAKER HAS JUST MADE A "NEW" MAP WITH THESE VERSIONS OF AIRPOWER & UTNAVY. IF YOU CONNECT TO A SERVER AND GET AN ERROR SOMETHING LIKE 'CAN'T DOWNLOAD PACKAGE UTNAVY BLA BLA' ITS BEST TO JUST DELETE ALL YOUR CACHE AND THAT CURRENT MAP YOU HAVE INSTALLED IN YOUR /MAPS DIRECTORY OF THE SERVER YOU JUST TRIED TO CONNECT TO..

                            THEN SIMPLY RECONNECT TO THE SERVER AND EVERYTHING SHOULD BE FINE.



                            Dont say I didn't warn you

                            Peace.

                            Comment


                              #15
                              NEW NAMES WILL BE:

                              AirpowerIIIa
                              UT2005Navy

                              I'm still working out a kink it APIIIa.

                              About to send Monarch UT2005Navy for his review. Only thing I see wrong right now is:

                              AIRPOWERIIIA

                              1.) When Jets are spawned their engine is set to on.
                              2.) If you get in a jet face it towards the sky then jump out the Jet stays at that position.

                              UT2005Navy

                              Still testing...........

                              3.)

                              Comment

                              Working...
                              X