-
Notifications
You must be signed in to change notification settings - Fork 37
Game Scripts
Avaiable since Beta-Release 3
Game Scripts are the method of adding additional effects to a game. Like dialogues, spawning units or adding additionl victory conditions or some fency animations and a lot more stuff.
A template for game scripts can be found in the template folder of a release
Note The name of the javascript name must be "gameScript"
var Constructor = function()
{
this.immediateStart = function()
{
// called to check if the game should start immediatly
return false;
};
this.victory = function()
{
// called when a player wins
};
this.gameStart = function()
{
// called before a game starts
};
this.actionDone = function()
{
// function called after all animations are finished
};
}
Constructor.prototype = BASEGAMESCRIPT;
var gameScript = new Constructor();
This section shows you a list of examples on how to use the game script feature. On top you may check out the map folder or co-scripts or game action scripts for other game script examples. This section won't cover everything possible with the gamescript feature. Since all functions of units, map buildings etc. that are in the public slots: section of the heades can be used to get information about the current game state or to modify it. This is a powerfull tool to create your own map with additional features.
E-Mail-Contact: commanderwars@gmx.de ask for help here. :)