1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

UE3 - UT3 Create gametype sample..

Discussion in 'Programming' started by Gleedo, Mar 4, 2009.

  1. Gleedo

    Gleedo New Member

    Joined:
    Jan 23, 2008
    Messages:
    64
    Likes Received:
    0
    Hi all, long time no see :)

    Just getting back into UT2004/UT3 after a break playing CoD4 :eek:

    Anyways, ive been trawling the internet looking for any samples on how to start creating a new team based gametype. Anyone know of any good examples on this kind of thing.

    I just need a pointer to help me on my way :)
     
  2. Angel_Mapper

    Angel_Mapper Goooooooats

    Joined:
    Jun 17, 2001
    Messages:
    3,532
    Likes Received:
    3
  3. DannyMeister

    DannyMeister UT3 Jailbreak Coder

    Joined:
    Dec 11, 2002
    Messages:
    1,270
    Likes Received:
    0
    Also, the UT3Dom team has released their source code for anyone to look at.
     
  4. Gleedo

    Gleedo New Member

    Joined:
    Jan 23, 2008
    Messages:
    64
    Likes Received:
    0
  5. Gleedo

    Gleedo New Member

    Joined:
    Jan 23, 2008
    Messages:
    64
    Likes Received:
    0
    Hi Danny, I did think about the Dom gametype last night. Will take a look and see what I can find out from their code - Thanks :)
     
  6. Angel_Mapper

    Angel_Mapper Goooooooats

    Joined:
    Jun 17, 2001
    Messages:
    3,532
    Likes Received:
    3
    Well, you can literally make any type of game you want with the engine, so writing a tutorial for custom gametypes would either be too specific or too vague. Best to just think about what type of game you want to make, then think about the individual pieces that you'd need to make it work, then go from there. :)
     
  7. Gleedo

    Gleedo New Member

    Joined:
    Jan 23, 2008
    Messages:
    64
    Likes Received:
    0
    Of course, you are absolutely correct in that :)

    I have a whole load of stuff written down and im happy that I can achieve quite a bit of it without much fuss, but having never created a gametype before leaves me with lots of unanswered questions...

    I think I can use CTF bases in this gametype as a starting point, but Instead of having a blue team base and red team base, these bases will just be A and B. One team attacking either of those bases, the other team trying to defend them. I dont want my attacking team to carry a flag though, but an Orb instead (though a flag would still be ok).

    Ive only done a bit of mutator coding previous to thinking about this project, so this may be way to ambitious....

    I think I would benefit from having someone to work with (even if they have limited experience too), but we'll see :)

    Congratulations on your mod (in the contest) btw :)
     
  8. Gleedo

    Gleedo New Member

    Joined:
    Jan 23, 2008
    Messages:
    64
    Likes Received:
    0
    OK, I cant use existing CTF maps, so will have to create custom maps for this gametype.

    Now, I will still be using CTF bases. Because this game will switch sides at half time, both teams will have a go at attacking 2 "neutral" bases designated A and B. My question is, how does my gametype know which of the bases in the map are "neutral"?

    Obviously i will create a test map and place 4 bases. 1 Red, 1 blue, and 2 neutral but I dont understand how to make my gametype know that...
     
  9. Gleedo

    Gleedo New Member

    Joined:
    Jan 23, 2008
    Messages:
    64
    Likes Received:
    0
    I have a compile error that I dont understand why its happening (despite the error description) or how to fix it....

    I have created a basic class called UTSDBombSite which extends UTGameObjective the same as UTCTFBase does.

    I then have a class called UTSDBombSite_Content which extends UTSDBombSite.

    In UTSDBombSite_Content's defaultproperties, i have this:
    Code:
    defaultproperties
    {
       Begin Object Class=AudioComponent Name=TakenSoundComponent ObjName=TakenSoundComponent Archetype=AudioComponent'Engine.Default__AudioComponent'
          SoundCue=SoundCue'A_Gameplay.CTF.Cue.A_Gameplay_CTF_FlagAlarm_Cue'
          Name="TakenSoundComponent"
          ObjectArchetype=AudioComponent'Engine.Default__AudioComponent'
       End Object
       TakenSound=TakenSoundComponent
       BaseExitTime=8.000000
       Begin Object StaticMeshComponent Name=StaticMeshComponent0 ObjName=StaticMeshComponent0 Archetype=StaticMeshComponent'Engine.Default__StaticMeshComponent'
          StaticMesh=StaticMesh'PICKUPS.Base_Flag.Mesh.S_Pickups_Base_Flag'
          CullDistance=7000.000000
          CachedCullDistance=7000.000000
          bUseAsOccluder=False
          CastShadow=False
          bForceDirectLightMap=True
          bCastDynamicShadow=False
          LightingChannels=(BSP=True,Static=True,Dynamic=True)
          CollideActors=False
          Translation=(X=0.000000,Y=0.000000,Z=-64.000000)
          Name="StaticMeshComponent0"
          ObjectArchetype=StaticMeshComponent'Engine.Default__StaticMeshComponent'
       End Object
       FlagBaseMesh=StaticMeshComponent0
       CTFAnnouncerMessagesClass=Class'UTGameContent.UTCTFMessage'
       bHasSensor=True
       IconCoords=(U=377.000000,V=438.000000,UL=45.000000,VL=44.000000)
       Begin Object CylinderComponent Name=CollisionCylinder ObjName=CollisionCylinder Archetype=CylinderComponent'UTGame.Default__UTCTFBase:CollisionCylinder'
          CollisionHeight=60.000000
          CollisionRadius=60.000000
          ObjectArchetype=CylinderComponent'UTGame.Default__UTCTFBase:CollisionCylinder'
       End Object
       CylinderComponent=CollisionCylinder
       GoodSprite=None
       BadSprite=None
       Begin Object Class=ArrowComponent Name=Arrow ObjName=Arrow Archetype=ArrowComponent'UTGame.Default__UTCTFBase:Arrow'
          ObjectArchetype=ArrowComponent'UTGame.Default__UTCTFBase:Arrow'
       End Object
       Components(0)=Arrow
       Components(1)=CollisionCylinder
       Begin Object Class=PathRenderingComponent Name=PathRenderer ObjName=PathRenderer Archetype=PathRenderingComponent'UTGame.Default__UTCTFBase:PathRenderer'
          ObjectArchetype=PathRenderingComponent'UTGame.Default__UTCTFBase:PathRenderer'
       End Object
       Components(2)=PathRenderer
       Begin Object Class=DynamicLightEnvironmentComponent Name=FlagBaseLightEnvironment ObjName=FlagBaseLightEnvironment Archetype=DynamicLightEnvironmentComponent'Engine.Default__DynamicLightEnvironmentComponent'
          bCastShadows=False
          bDynamic=False
          Name="FlagBaseLightEnvironment"
          ObjectArchetype=DynamicLightEnvironmentComponent'Engine.Default__DynamicLightEnvironmentComponent'
       End Object
       Components(3)=FlagBaseLightEnvironment
       Components(4)=StaticMeshComponent0
       RemoteRole=ROLE_SimulatedProxy
       bStatic=False
       bAlwaysRelevant=True
       CollisionComponent=CollisionCylinder
       Name="Default__UTSDBombSite_Content"
       ObjectArchetype=UTSDBombSite'UTGame.Default__UTSDBombSite'
    }
    
    When i compile, i get the following error:
    Code:
    C:\Program Files (x86)\Unreal Tournament 3\Development\Src\UTSearchAndDestroy\Classes\UTSDBombSite_Content.uc(13) : Error, BEGIN OBJECT: No base template named
    StaticMeshComponent0 found in parent class UTSDBombSite:    Begin Object StaticMeshComponent Name=StaticMeshComponent0 ObjName=StaticMeshComponent0 Archetype=St
    aticMeshComponent'Engine.Default__StaticMeshComponent'
    
    So I looked at UTCTFBase as that was my template for UTSDBombSite, and that file has no reference to 'StaticMeshComponent0' either. Can someone explain whats going wrong....
     
  10. Angel_Mapper

    Angel_Mapper Goooooooats

    Joined:
    Jun 17, 2001
    Messages:
    3,532
    Likes Received:
    3
    Try it like this:
    Code:
    Begin Object Class=StaticMeshComponent Name=StaticMeshComponent0
    You don't need the Archetype stuff, and you're missing the Class= in your line.
     
  11. Gleedo

    Gleedo New Member

    Joined:
    Jan 23, 2008
    Messages:
    64
    Likes Received:
    0
    Hi AM, the Class= is missing because when i had it there, the compiler said something about 'did you want to override...if so remove class=' etc.
     
  12. Gleedo

    Gleedo New Member

    Joined:
    Jan 23, 2008
    Messages:
    64
    Likes Received:
    0
    This may be a stupid question, but is it possible/ok to code against v1.3 scripts even when you have a 2.0 patched system?

    Im having so many compile issues working against exported 2.0 scripts you see....its really pissing me off :mad:
     
  13. DannyMeister

    DannyMeister UT3 Jailbreak Coder

    Joined:
    Dec 11, 2002
    Messages:
    1,270
    Likes Received:
    0
    Most things work exactly as before. It would be a really good idea to re-export scripts now so you make sure you are seeing the latest code, though.

    One other thing to remember when having tons of compile errors from stuff in your default properties is that the exported scripts really tend to mess them up. For a better example of how to do Objects in defaultproperties correctly, go download Epic's code from the UDN if you haven't already. The latest there is 1.3, but that is still better than trying to copy from anything you have exported.
     
  14. Gleedo

    Gleedo New Member

    Joined:
    Jan 23, 2008
    Messages:
    64
    Likes Received:
    0
    Hi Danny, the latest I could find on UDN was 1.2:
    http://udn.epicgames.com/Three/UT3Mods.html#UnrealScript :(
     
  15. DannyMeister

    DannyMeister UT3 Jailbreak Coder

    Joined:
    Dec 11, 2002
    Messages:
    1,270
    Likes Received:
    0
    The link to 1.3 is at the top of the very first UT3 mods page. Further down, there is a link to "1.4" listed, but it doesn't work. Or you can follow angel mapper's link.
     
  16. nawrot

    nawrot New Member

    Joined:
    Jan 23, 2008
    Messages:
    89
    Likes Received:
    0
  17. Gleedo

    Gleedo New Member

    Joined:
    Jan 23, 2008
    Messages:
    64
    Likes Received:
    0
    Thanks for the link nawrot - its very, very helpful.

    I have the ability to hack and tweak other mods, but not to write one from scratch, so that link is incredibly useful to me.

    Im going to go right back to basics and use their dev guide to help me along my way :)
     

Share This Page