Compile Unreal Script with conTEXT

hello my name is Eduardo eben I’m a software engineer in an a video game developer okay on this video I want to show you how to compile Unreal script using the contacts software tool and just find the latest version of IDE at the time of this video is the UDK 2012 0 1 I mean the latest version of UDK is the 2012 January to 12 2012 okay alright first thing I do of course is download context if you do a Google search contacts you will find www context editor dartboard you are going to download the software and I after it after installation I put the shortcut right here on the screen right next to the UDK January 2012 right here executable file another important piece of software we’re going to need actually this is more like a file it’s the unreal oh I have it right there a real script dot c HL and you’re gonna find this at the wiki of Beyond on Rio com / come text or explain what this fire is in a second this fire will help the IDE to call our code the you know as we as we run you know type the code you see how the function is in blue here simulated function and comments are in green we need this file to be able to do that with context okay what you want to do here at the bottom of this page we have the fire here but the way they put the fire is kind of a little difficult to copy because anyway you’re gonna get a ward document because you want the you know the the color format you’re going to select everything right click coffee bring the Word document here alright once you have selected you know paste you don’t really need to save it straight to a Word document like this I like to do it so I can save it in a separate place like let’s say for example I’m going to create a directory here let’s say my game project and inside of that I’m gonna put the folder called documents and then inside the folder I was saved this document desk yes I’ll leave it at this name close this so I have it there

but we’re we’re really gonna need this file will be here under your C Drive Program Files look for the context highlighters I already have it here because I already done this but how you put this here is click in there open a new text document remember he has the dot txt extension but you’re actually going to name it like this here unreal script dot c h l the only capital letter is the you on this whole thing alright I’m just showing you to you know so it’s not gonna tell me there’s a copy of it but you see how I have a txt file again I’m teaching this in case someone doesn’t know I can change the extension of the file here now to see H L if I click out I’m gonna get a message say if I wanted to you know change the name of the fire extension I’m gonna say yes so this is no longer the notepad file now open it and paste that text amen okay remember I’m leaving this one here so we can see it later on all right so save it now we have it in that remember this is not the UDK this is the contacts folder I hope I’m not going too fast all right close close now we’re gonna go to options okay so uh options environment options okay at this point you can pause the video and make sure that your environment option is the same as this one just follow you know everything that is checked and unchecked everything that’s not checked here you know if I guess it’s quicker this way instead of having me explain one by one but just you know the two most important things here is to make sure that when we the when started we want to leave it that open last file project that means that every time we go back to the this IDE we’re going to go back to the last file we’ve been working on and remember editing position which we’re gonna go back to the last file in at the exact spot where we left off on the screen so these tube are the most important ones here to remember but again pause the video make sure you get them all all the ones that are checked right on the editor on the editor again pause the video one more time make sure you have them all all the ones are supposed to be checked you know and okay this is my opinion you can do it or if you want I like to have the block indent and the C Java block and then 2 4 this makes it easier to read your code once you start you know typing the code here makes it easy to find things in code because of our you know spaces in the highlighter we’re gonna use the highlighter we’ve we imported the file all right select our new script and okay here under execute keys I have it ready here but I’m gonna delete it so and I’ll show you okay you’re gonna click on user exit keys you’re gonna add you’re gonna type lowercase you see no nothing else just you see click okay now

select f9 we’re gonna map the the f9 function key to to the executable file on on UDK directory select yeah go back from here drive scene you decay here the cake one more thing you should get used to the directory I mean the directory is inside UDK where everything is like what what the binaries are for the development the engine in the UDK game alright so I’m gonna look for that executable fire which is under binaries win32 and eunuch a dot exe here click open no this is what we map were mapping the f9 key to execute this file that’s gonna be the compiler it’s gonna check your code to see if it’s correct right now we’re gonna highlight this except the UDK dot exe and we’re just gonna paste it down here on this start in see what I did here is the exactly copy from above but excluding the UDK dot exe on the parameters you gotta type make that’s gonna tell UDK that we want to our compile code instead of running the game alright because if you go straight for the UDK dot exe is gonna open the you know the game we’re gonna capture console output and we’re gonna scroll console to the last line all right so we just met the f9 key to do this before we move to the next screen make sure make sure you are sorry I have to pause the video okay again before you move to the next screen make sure you pause the video here and you know make sure you’re checking everything that is supposed to be checked here and everything and now other associations I’m gonna remove this year because I’m showing you what you gotta do it okay we’re gonna add got you see we want the you know the context to associate files of that extension and to be open here okay doc you and you’ll see click apply click OK now to be able to test the context compiler actually shouldn’t say that we’re compiling using UDK the context is just the ID okay again it’s very important you understand the directory structure you know since you you know if you’re gonna be making games you gotta know the directory structure were you supposed to put like you know the 3d objects and source code and all that stuff alright under development which is for programmers that’s basically mostly where programs are going to be working that’s where you’re gonna creating your code I’m saying this way okay double click on development double click on see I mean SRC which stands for source code now in here we’re gonna create a directory I’m gonna I’m gonna name this directory with my name I’m gonna call it Eduardo game No yeah we’re gonna double-click on it inside that directory we’re gonna create another folder I’m gonna call it classes and double click inside that folder

we’re gonna create the first script file I’m gonna create a text file format the XD let’s name this again I’m gonna name it my name you can name it your name just so we know that we were able to compile with success all right so Eduardo dot you see we’re gonna get the message saying if we want to change the file extension yes now we are ready to use the code you start typing code you close this we’re gonna access that file from here double click on the development that will click on source code under the waters game classes and here we have it I will click it so we can not have it here remember yeah thing just as a reminder we want to make sure that we have line numbers right it’s very important to have the line numbers see one we’re going to start typing the code here it’s you know the the compilation results it give give us a hint where the problem is alright I’m sure everybody knows this you know okay make sure we have unrealscript selected here so we can use that color code now we’re gonna start typing our code now okay now I’m gonna show you how to do a basic hello world message to the log file in the UDK environment I’m trying to make again you know make this video on the ten minutes so I’m gonna put as much as notations as possible and go a little quicker now so make sure you follow on with now without missing anything right again now I’ll make sure how I explain what’s happening here with as much notations as possible okay first thing you want to do we need to define an object and its relationship to other objects in the game so fine okay the name of this class also has to be the same exact name as the dot you see five year otherwise we’ll get the computation here right okay so we’re gonna create the class Eduardo and the class Edward Edward just trying to remember okay next is Hector okay the exten sector makes Eduardo a child of actor all right so this is what we’re doing here in for the less word the cute last

keyword placeable alright the placeable option here will let us have a visual reference in the UDK editor of where we’re actually placing this class trying to be as clear as possible here but you’ll see what’s gonna happen so placeable okay starts now this is where we’re gonna take the message we want to lock let’s say context and we’re gonna leave this thing here so it will be easy to find this this line in the the log file that’s how we will know if the compilation went everything okay which this now are you gonna create this sprite which will be a default image that it’s already in the UDK editor so we can have our visual reference of our Eduardo factor right so we’re going to straight image so I put this crazy sprite default image the fault properties okay right okay

I me a second here we’re just gonna throw a check everything harder what’s the exact baseball okay now we need to tell the UDK editor that we wanted to compile this Eduardo game so we go to computer your decay they’re important now UDK game config where is it default editor dot I and I I’m sorry default engine thought and I I’m sorry okay correct one default engine that look weird alright under edit packages here we’re gonna add another one we’re gonna edit packages Edoardo game which is this one right here okay close and save we’re telling the compiler we wanted to run this package awesome now I’m not gonna close this but I want you to double click on logs and this is the log file we’re gonna open and check if all compilation work if everything goes okay no errors or anything that’s where we’re gonna make sure that it it did work all right now let’s compile it remember we mapped f9 to run the UDK compiler right so we’re gonna click f9 and we have an error okay it’s good this is happening so we we can figure out the area okay so I’m quiet aborted doing here it says on line 8 there’s an error missing the same : oh actually I I am my Nate actually it’s right here 9 3 ok here’s the thing I find a little weird with the UDK compiler sometimes it does you see how it’s telling me the error I know in the air is it’s actually here but it’s telling me the error is on line 8 so actually on line 3 but you know anyway the the clue here are missing semicolon this is supposed to be with the same : this is not but because this isn’t that’s where the error is picking up from alright so let’s close this let’s fix the error press f9 again this error message is something I wanted to happen so I can show you disregard this this is just actually a backup you know trying to run over and over over this backup fire right here it doesn’t mean this didn’t happen it’s ok just click OK and we shouldn’t have any error okay

everything is good to go zero errors zero warnings now if we close this everything compiled okay if we go to judicata unike game the logs the first log it gives us the you know the compiler log the result if everything went okay right so the second lock launch – should give us the hello world if everything worked fine but it shouldn’t be here yet if I type ctrl F to find world it’s not in here yet because I didn’t run this fire inside the UDK engine okay so we’re gonna leave it here minimize it we’re gonna run the UDK engine okay all right we’re gonna open a map okay game content Maps samples example map just yeah No we want to save this map as that save it as my name because we don’t want to make changes to the example map it’s not right so let’s do okay so make sure we got my map so we’re not gonna make changes to the example map now we’re gonna go to the content browser I’m going to select actor classes we can see our I’m categorized active yet we want to uncheck show categories we want to select the actor from here so left click on so you selected make sure you selected right click and add our actor yeah now this is the visual reference that because of this code here it’s allowing us to see it you know I’m gonna close this and actually let me play from yeah there is our actor right there that is a

confirmation of visual confirmation that it worked right but now we want to see if our hello world was logged into the beginning before the game started yes we’re gonna exit UDK yes save and now the final step to make sure that everything we did was correct we’re gonna go to the UDK again now you know advice get familiar with the directory structure even after you get familiar with it it’s still confusing sometimes right the log files and remember the first file shows everything that you know when was the game engine runs and this is where we should find our and there it is hello world this is my first to decay script using context it worked this is the confirmation that everything was successful the reason I wanted to make this video it’s because I made a previous video with Visual Studio 2010 and compile Unreal script using Visual Studio 2010 with the infringe plug-in but the company that releases the infringe plug-in they want to charge 10% of your profit with a license to you know anyway I’ll say this straight infringes you know it’s a debugger it’s not even a compiler in my opinion this is not worth it you know so I wanted to you know make it work here with the contact with the latest version of UDK so it can help everyone out there you know this is free contacts is free and as you can see you can do the job thank you for watching the video just like on every other video I make if you have any questions just write it down then thank you