AMIR REZAs متخصص ساخت بازی
تاريخ عضويت: 3 شنبه 11 اسفند 1388 تعداد ارسالها: 335 محل سكونت: تهران
2 شنبه 4 بهمن 1389 - 22:47 |
|
|
سلام
اینکه تنها منبع ترجمه شده هست:
http://263421.20upload.net/files/sh3/12853365581.zip
Pdf های زبان انگلیسی :
http://www.udk3developer.com/PDF/USTutorial-1.pdf
http://www.udk3developer.com/PDF/USTutorial-2.pdf
http://inst.eecs.berkeley.edu/~cs164/sp0...ture43.pdf
سایر منابع:
http://unreal.epicgames.com/UnrealScript.htm
ترجمه گوگل:
http://translate.google.com/translate?hl...Script.htm
http://khup.com/keyword/unrealscript.html
--------------------------------------------------------------------------------------
A Supereasy Unrealscript tutorial, and some learning
http://okita.com/alex/?p=444
ادامه ی مطلب :
کد:
http://okita.com/alex/?p=444
------------------------------------------------------------------------------------
http://chimeric.beyondunreal.com/tutoria...uide1.html
http://chimeric.beyondunreal.com/tutorials/tut27.php
و.........................
ادامه ی مطلب :
کد:
http://chimeric.beyondunreal.com/tutorials.php
What is Unrealscript?
Unrealscript is the soft architecture behind all of the core game mechanics in Unreal Tournament 3, and many, many other games. In Unreal Tournament 3, it not only controls things such as how the power ups and weapons are handled, it also deals with the gameplay fundamentals, and even the vast majority of the editor and effectively every ingame object, from a static mesh to a brush. We have access to all of that script, which makes us pretty powerful!
The concept behind unrealscript was to offer a powerfu, built in scripting language that could control various aspects of the unreal game, concepts of time, state, properties, and networking, all without the need to delve into over-complication C++ source code. Unrealscript thus focuses on these core game orientated elements and does so by taking out the need to deal with all those individual bits and pixels. It gives us a safe environment to experiment in, free of pointers, unsafe code and complexity, so that we can write games and not worry about dealing with the nastier elements of games programming.
Basic Variables and Operators
The first thing we need to know is how to use, declare and manipulate the basicmost variables. These are the ones you'll come across and be using the most and are generally fundamentally the most important. Variables can be declared in local or global space. The difference? A global variable is accessible by all of the functions in that script class, and in fact by every other class in the game.Global variables must be declared before any functions are declared - otherwise the compiler will tell you that they are unexpected and will refuse to compile. Local variables are specific to individual functions, and can only be accessed by those functions - they are declared within the function itself, and manipulated from within the function.
There are also a number of different operators that can be used with our variables that allow us to modify and manipulate them as we need to. This is always done from within a function. Some operators can only be used to manipulate certain variables, and some may have different effects dependent on what variable they are attempting to manipulate.
uscript code:
class UnrealScriptTest;
var byte ByteNumber;
var int IntegerNumber;
var float FloatingPointNumber;
var float FloatArray[10];
function DoMath();
{
local bool Boolean;
local string String;
local name Name;
FloatingPointNumber = ByteNumber + IntegerNumber;
FloatArray[0] = FloatingPointNumber;
}
DefaultProperties
{
ByteNumber = 1
IntegerNumber = 5
FloatingPointNumber = 10.5f
}
What have we got here then? Well, we've declared three global variables and an array of variables - a byte, an integer, a floating point number and an array of integers. We could use these variables anywhere we wish - but we have to be mindful about what they have been set to in the past. The array is a special construction that in this instance will contain a sequence of 10 integer variables, and can often come in quite useful. We need to be careful with arrays however, and remember that the first number we put in the array is not position '1', but is in fact position '0'. This means that to access the first number in the array, we use FloatArray[0], and to access the last we use FloatArray[9]. Confusing, perhaps, but this is how it works. We also gave some of our global variables default values. This is generally a good idea, because otherwise if we try to use them and haven't given them a value yet, then our script will return 'none' (which will appear in the script logs as a warning), and we could get some whacky things going on in the game, or something might not work at all.
We also have three local variables declared in our function; a boolean value (true or false), a string of characters and an unrealscript specific variable, a name. These variables can only be used inside this function, and just can't be accessed from anywhere else - in fact if you try, the unrealscript compiler will just give you a good telling off.
We didn't actually use our local variables in our DoMath function, which means that the unrealscript compiler will give us some warnings. It will tell us that they are unused, which means that we can happily delete them from our code, or comment them out. We can still run the game with the code, because warnings are just warnings, and not errors, afterall.
ادامه ی مطلب :
کد:
http://www.moddb.com/games/unreal-tourna...realscript |
|
|