Three Things I Wish I Knew When I Started Using the UDK

Boy, Unreal Engine 3 is a gift that just keeps on giving. I’ve been using Unreal in a professional capacity for a few years now (with occasional forays into UDK-land to see how I fare without source code) and I still find out about new features all the time. Game development being what it is, those discoveries are often answered with a heartfelt: “That’s great! I wish I had known about that 6 months ago…”

So, in the spirit of helping out others using Unreal Engine 3 or the UDK, here are three features that I wish I had known about when I first started using Unreal.

Kismet Console Command
What’s the easiest way to call an UnrealScript function from Kismet? Write a custom sequence action? No!

Use the Console Command sequence action. Using it you can call any function marked with the exec keyword in UnrealScript. All you need to do is pass in a valid target for the sequence action (most likely a PlayerController, like in the convenient All Players kismet variable.)

Cause Event
Console Command will allow me to easily call into UnrealScript from Kismet. What if I want to go in the other direction? That’s where the Console Event node comes into play. This kismet event gets executed when the “causeevent” console command is triggered through UnrealScript. This makes it trivially easy to write code that calls out from UnrealScript into Kismet.

Having a Pawn, for example, calling “causeevent PawnHitWall” (“CE PawnHitWall” for short):

   PlayerController(Controller).ConsoleCommand("CE PawnHitWall");

Results in the following Kismet event being called with the PlayerController’s Pawn passed through as the Instigator:

I’m a bit sheepish to admit it, but I jumped into Unreal without really understanding the relationship between Actors and ActorComponents. As a result, I probably created dozens more custom actor classes then I ever needed. In hindsight, the extra classes were senseless because it is so trivially easy to add new ActorComponents in the defaultproperties of a class. Spawning Emitters (a descendant of Actor) when I could have just added ParticleSystemComponents in my Pawn’s defaultproperties block was probably my worst offense.

If you only read one page on UDN, read the page on ActorComponents. (If you only read one page on UDN though, you’re probably doomed. Read a lot of UDN pages, just make sure you don’t miss the one on ActorComponents.)

For people experienced with Unreal, these tips are probably old hat, but it’s surprising how far you can get with the engine while still missing basics like ones above. Personally, knowing the above tidbits ahead of time would have probably sped up the development of my first Unreal Engine game prototypes significantly.

Share this Article:
  • Digg
  • StumbleUpon
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • Print