Results 1 to 9 of 9
  1. #1
    Palace Guard
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    3,635
    Gamer IDs

    Gamertag: tegleg digital

    Default Setting up script projects (easy guide)

    hello there.

    i see people struggling and making silly mistakes setting up their script projects, or just doing it plain wrong.
    the official docs here are not all that easy to follow.
    so heres a quick step by step.

    1. navigate to UDK/Development/Src/
    make a new folder, call it what you want but here ill call it 'TegIsAce'.
    make another new folder inside that and call it 'Classes'
    now you have something like this
    UDK/Development/Src/TegIsAce/Classes
    this is where all your custom script files will live.


    2. to make the engine know about your project we need to tell it.
    open UDK/UDKGame/Config
    find DefaultEngine.ini and double click to open it.

    find this bit
    Code:
    [UnrealEd.EditorEngine]
    +EditPackages=UTGame
    +EditPackages=UTGameContent
    add the name of your new script folder here like this
    Code:
    [UnrealEd.EditorEngine]
    +EditPackages=UTGame
    +EditPackages=UTGameContent
    +EditPackages=TegIsAce
    if you try and start udk now it will moan at you because the script folder is empty.

    3. add a script file of your own.
    heres a simple gametype to get you started.
    create a file called MyGame.uc and paste this into it. then Save it in Your Script Folder ei. UDK/Development/Src/TegIsAce/Classes
    Code:
    class MyGame extends UTGame;
    
    /**
      * Allows overriding of which gameinfo class to use.
      * Called on the DefaultGameType from the ini, or the one specified on the command line (?game=xxx)
      */
    static event class<GameInfo> SetGameType(string MapName, string Options, string Portal)
    {
    
    	return default.class;
    }
    
    defaultproperties
    {
       //define default hud, pawn and player controller and other stuff for this gametype here
       HUDType=class'UTGame.UTHUD'
       PlayerControllerClass=class'UTGame.UTPlayerController'
       DefaultPawnClass=class'UTPawn'
    }
    you now have your own gametype, to make udk use this as default...
    4. navigate to UDK/UDKGame/Config and open DefaultGame.ini
    find these lines
    Code:
    DefaultGame=UTGame.UTDeathmach
    DefaultServerGame=UTGame.UTDeathmach
    ....
    DefaultGameType="UTGame.UTDeathmach";
    change it to point to your gametype
    Code:
    DefaultGame=TegIsAce.MyGame
    DefaultServerGame=TegIsAce.MyGame
    ....
    DefaultGameType="TegIsAce.MyGame";
    so thats "YourScriptFolderName.YourGameType"

    you can also define the default player controller in that section
    PlayerControllerClassName=

    and thats it.
    open the frontend and click 'Script' then 'Full Recompile'

    any problems or anything let me know
    Happy Coding

    edit:
    5. (optional)
    one other thing,
    to make the game just start on your map open UDKGame/Config/DefaultEngine.ini
    and change these lines to point to your map
    Code:
    Map=YourMap.udk
    LocalMap=YourMap.udk
    Last edited by tegleg; 11-13-2012 at 11:37 AM. Reason: added more to the gametype
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    Please ask questions in the forum, NOT a private message
    tegleg.co.uk
    My Tutorials n Stuff
    Games: Tegs Playground - Unwheel2 - VCTF Game - Sponic Mesh 3D - Shh.. dont tell anyone about my android apps.
    will code for money

  2. #2
    MSgt. Shooter Person
    Join Date
    Sep 2006
    Posts
    283

    Default

    You have been a huge help to this forum tegleg! Thanks again for making life a little easier

    Steven

  3. #3
    MSgt. Shooter Person
    Join Date
    Nov 2009
    Location
    Jacksonville, Fl.
    Posts
    456

    Default

    I am coming back to the engine after a long break and I dont seem to be able to get the editor or game to load my package by following this tutorial. Can anyone confirm that this is still the way to do it?

  4. #4
    Marrow Fiend
    Join Date
    Jul 2006
    Location
    UT40k
    Posts
    4,188

    Default

    afaik thats still uptodate , just make sure your graphical content is in the UDK\UDK-2012-05\UDKGame folder.

    i show this in my videos
    UT40K:The Chosen - Warhammer 40,000 for UDK
    ut40kgeodav - UT3 Tutorials - Characters - Weapons - Vehicles - FaceFX
    UDK Tutorials - Basics - Vehicles - Characters - Weapons

  5. #5
    MSgt. Shooter Person
    Join Date
    Nov 2009
    Location
    Jacksonville, Fl.
    Posts
    456

    Default

    LOL, I was just watching your (Geodav) Youtube channel to try and figure it out and I was so happy to see you had updated your vidoes. Its funny that you were the first to reply.
    I had just started your second gametype video and then I had to go away before getting through to do my job and now its time to leave.
    I have my folder setup as:
    C:\UDK\UDK-2011-11\UDKGame\Content\JohNLA\Content\Characters
    BTW, you truly deserve that MVP badge

  6. #6
    Palace Guard
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    3,635
    Gamer IDs

    Gamertag: tegleg digital

    Default

    thanks geodav
    did you get it sorted JohNLA?
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    Please ask questions in the forum, NOT a private message
    tegleg.co.uk
    My Tutorials n Stuff
    Games: Tegs Playground - Unwheel2 - VCTF Game - Sponic Mesh 3D - Shh.. dont tell anyone about my android apps.
    will code for money

  7. #7

    Unhappy

    EDIT : i was trying to compile the Aeroplane man code
    after several retreis and looking over the code carefully i still can't get UDK to compile the code you gave here. I think i did it excatly as im supposed to.
    Do you have any idea what it might be? i was thinking i made a pathing error but ....it just can't find the mistake
    here's the error
    Last edited by subgamedeveloper; 09-04-2012 at 11:26 AM.

  8. #8
    Palace Guard
    Join Date
    Feb 2010
    Location
    Tegleg Records
    Posts
    3,635
    Gamer IDs

    Gamertag: tegleg digital

    Default

    you have copied it wrong, please look at what the error actually says.
    unexpected 'sstatic'
    should be static with 1 s
    Code:
    We.spazmodicaly.simulate.new.sound.with.technical.equipment.that.is.specificaly.manufactured.for.humans.to.communicate.in.outer.space.Tegleg.manipulates.time.and.space.to.create.new.experiences.to.generate.a.hardcore.database.generation.
    Please ask questions in the forum, NOT a private message
    tegleg.co.uk
    My Tutorials n Stuff
    Games: Tegs Playground - Unwheel2 - VCTF Game - Sponic Mesh 3D - Shh.. dont tell anyone about my android apps.
    will code for money

  9. #9

    Default

    Quote Originally Posted by tegleg View Post
    you have copied it wrong, please look at what the error actually says.
    unexpected 'sstatic'
    should be static with 1 s
    Your right. how did it get there? anyways thanks a lot now i can continue.


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.