No announcement yet.

Placing custom vehicles in maps

  • Filter
  • Time
  • Show
Clear All
new posts

    Placing custom vehicles in maps

    I am not a mapper, but one the guys in my crew is. He wants to place a custom vehicle in one of his maps, but I can't find a tutorial on how to do this. I looked at the Unreal Wiki and did a search here, but not finding much of help. The wiki said just place a vehicle factory, but it was kind of vague. He tried that and any custom vehicle crashed his editor with the following:

    Bad import index 578791/827

    History: IndexToObject <- ULinkerLoad<<UObject <- (LinkerLoad Package.LinkerLoad200 15512148)) <- SerializeExpr <- (00) <- SerializeExpr <- (0A) <- SerializeExpr <- (05) <- SerializeExpr <- (62) <- UStruct::Serialize <- (Class myLevel.Factory_AllGameGenericVehicleFactory26) <- UState::Serialize <- UClass::Serialize <- (Class myLevel.Factory_AllGameGenericVehicleFactory26) <- LoadObject <- (Class myLevel.Factory_AllGameGenericVehicleFactory26 15512148==15512148/23510048 15512087 69) <- ULinkerLoad::Preload <- PreLoadObjects <- UObject::EndLoad <- UObject::LoadPackage <- UEditorEngine::Exec_Map <- UEditorEngine::Exec <- (MAP LOAD FILE="C:\UT2004\Maps\VCTF-AliensPD.ut2") <- UUnrealEdEngine::Exec <- FileOpen <- WEditorFrame::OnCommand <- WWindow::WndProc <- WWindow::StaticProc <- MessagePump <- MainLoop
    Can anyone give me a quick link to a good tutorial on placing vehicles in a VCTF type game? Thanks so much...

    Creating a proper link to custom content like this can be done a couple of different ways, but they use the same, "Make sure there's a connection", method under the hood. UnrealScript makes efforts to link to external (or embedded) packages automatically.

    So, if you have a custom vehicle in an Unreal package like, "MyCar.u", in the System/ directory, you should be able to (in code) make the reference in the "#exec" header to "MyCar.u", to make sure that file is available for UnrealScript to search through and make proper links.

    (For an example of the header "#exec" stuff, take a quick look at some of the code for Onslaught vehicles or some Invasion monsters for examples of loading external resouces for meshes, textures, etc.)

    If an actor/object with this reference is in your map, then when you place a normal ONS Vehicle Factory or some custom vehicle factory (like TeamVehicleFactory), your custom package file should be automatically searched and your custom vehicle should appear on the list of available vehicles to spawn from that factory.

    If you'd rather not use an external package, you can embed the resource in the map file itself, by using a virtual package called "MyLevel". And at this point, I strongly urge you to review the documentation on MyLevel on the UnrealWiki. Basically, if you embed this custom vehicle in the map itself, it will appear in lists of available vehicles, just as if it were accessed through an external package file.

    May not be a tutorial link, but I hope that helps.