Download

New to UE4, need help making the switch form UDK

I’m struggling with a few things. In UDK, I could specify the pawn and controller to use for that level. How do I get UE4 to recognize and use my own character class?
I’m also getting lost in the source code. With UDK, I used UncodeX to view classes and their functions, but I can’t find documentation to know what functions I have access to in the Pawn/Character class.
Another thing: in UDK, I often used `log or broadcast to display messages to myself at runtime. What’s the best way to do this in UE4?

Hi, I’m new to UE4 too but I’m an esperienced udk coder, same problem here, I’m lost in “C++ epic deprecated code sea”, every tutorial i’m following won’t compile correctly due to new 4.7.6 code changes.
please help! I don’t like to use BP!
I was reading the “William Sherif learning C++ creating games with UE4” ebook (4.5 ) , but the code is deprecated too… is Epic team running too fast? What do we have to expect with new changes in 4.8 version?
sorry for my english and sorry if it’s just me , but I would never have switched from udk if not forced to!

To specify the standard classes to use for a level, you can make a class derived from AGameMode and set, amongst other default classes, the DefaultPawnClass and PlayerControllerClass in the constructor of the gamemode:



DefaultPawnClass = YourPawnDerivedClass::StaticClass();
PlayerControllerClass = YourPlayerControllerDerivedClass::StaticClass();


As for the log the simplest thing would be



UE_LOG(LogTemp, Warning, TEXT("Hello World"));                   //gets printed to the output log

if(GEngine)
  GEngine->AddOnScreenDebugMessage(-1, 10.f, FColor::Cyan, TEXT("Hello World"));       //gets printed directly on the screen


Here is a great wiki page written by Rama, about printing logs at runtime: A new, community-hosted Unreal Engine Wiki - Announcements and Releases - Unreal Engine Forums

For the accessible functions you could first use the auto completion from VS, although it doesn’t work well with UE4, which is why many people here in the forums are using Vissual Assist. It does cost around 100$ for a personal license but it is worth every penny, in my opinion.
Second, this page (Unreal Engine 4 Documentation | Unreal Engine Documentation) is pretty usefull to see what functions, variables etc. a class has. This is especially great if you want to know, which functions you could override in e.g. AGameMode, to see how you can influence the games behaviour. To get to the API there, you should either select “API” if you search for a term like “GameMode” or if you know the exact name you can type it in directly, like “AGameMode”.

There is no too fast, as long as the quality of the updates doesn’t suffer from the speed and it definitely doesn’t :smiley: It’s really great that Epic publishes so many major updates with great new features so frequently though it does have it’s downside, one being that the tutorials get outdated pretty fast. Therefore I think that it doesn’t make much sense to read a book as it can’t update what is written there, but the tutorials online can. In many of Epics tutorials on youtube (which I can really recommend) they blend in some information about changes tha have been made since the videos was recorded.
If you have any troubles with code not compiling or have other questions, you are welcome to post your problems here in the forum, there are many people who are willing to and will, or at least try to, help you. Except your question has been asked over and over again but a quick google search should do the trick there :wink: And even if a question gets asked multiple times the guys here are surprisingly friendly when it comes to that “problem” in comparison to the rest of the internet :slight_smile:

Hope that helps.