[Home]
[Edit this page]
[Recent Changes]
[Special Pages]
[Help]
Beginners-Guide-Scripting
Object oriented in this case means that it uses a predefined object modell - similar to JavaSripts object modell tree - to create new instances of these objects.
In the examples above, 2 new objects are created using the new operator. The first line of code above creates a new SimObject. A SimObject is the base object of any character object, that is aiPlayer or Player objects. Every new object or variable is prefixed either with % or $. The $ symbol is used to denote string variables.
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
Beginners-Guide-Scripting
Beginners Guide Game Scripting
This is a thorough overview of scripting languages as used in many Game engines. Since most Game engines have their own scripting - or at least a version of C-script - the following overview should also be useful for developers that use different scripting languages.Object Oriented Scripting
The scripting language described here - C-script - is an object oriented scripting language, using methods, packages, datablocks and functions.Object oriented in this case means that it uses a predefined object modell - similar to JavaSripts object modell tree - to create new instances of these objects.
SimObject %myObject = new SimObject; //create a new SimObject
Player %myPlayer = new Player; //new Player object
myPlayer.addItem("Ammo"); //add new ammo to player weapon arsenal
In the examples above, 2 new objects are created using the new operator. The first line of code above creates a new SimObject. A SimObject is the base object of any character object, that is aiPlayer or Player objects. Every new object or variable is prefixed either with % or $. The $ symbol is used to denote string variables.
$myPlayerName = "Doom"; %hour = (60*60 *60);
functions, packages and datablocks
[Edit this page] [Page history] [What links here] [Discuss this topic] [Printer Friendly]
