Find a file
joris f8aff0f96d [+]Integer constants in animations could be given as unit's or player's variables.
Definition of animation variable: 
	v_<unit_variable.tag>, where unit_variable - any variable(you can also use user defined variables) of the current unit, tag - variable's tag(Value,Max,Increase,Enable,Percent).
Example: v_HitPoints.Value
Percent returns the proportion between Value and Max in range 0..100
	t_<unit_variable.tag> - same as previous, but refers to unit's current goal unit(target in attack animation, mine in resource etc.). If goal doesn't exist, returns 0.
	p_<playernum.property[.argument]> - where playernum - player's number(you can use "this" to refer the unit's player), property - player's property(see the GetPlayerData function for more information), optional <argument> - specifies the property's argument(need for resources and unit-types)
Examples: p_1.TotalUnitLimit p_this.Resources.gold
	r_<value> - returns the random value between 0 and <value>
Though if vaiable couldn't be reconized, game will try to convert it into integer constant(0 will be returned if convertation fails).
[+]New actions in animations:
	(modified) "spawn-missile <missile-type> <startx> <starty> <destx> <desty> <flags>" - spawns <missile-type> relative to the current unit adding <startx> and <starty> to position. <destx> and <desty> specify the missile's destination point. Could be used as more configurable replacement to the standard "attack" action. <flags> used to configure the action, you should specify it separated by points:
		"damage" - missile will generate damage, values are taken from the action unit.
		"totarget" - missile will ignore <destx> and <desty> and will fly to unit's current goal.
		"pixel" - missile will use pixel coordinates instead of tile coordinates, useful for more accurate missile placing.
		"reltarget" - the source of missile will be the unit's current target, so all parameters will be calculated depending of target's parameters, not source's(even the "totarget" will shot the missile back to source unit). Through the damage parameters are always taken from the source unit.
		"ranged" - missile will check the current max and min attack ranges from the unit("reltarget" inverses logic)
	"spawn-unit <unit-type> <offx> <offy> <range> <player>" - spawn <unit-type> relative to the current unit adding <offx> and <offy> to position. <range> specifies the maximum distatnce from the source unit.
		Example: "spawn-unit unit-something 2 1 v_AttackRange.Value this"
	"if-var <lvalue> <rvalue> <condition> <state>" - jump animation frame to label <state>, if <lvalue> is <condition> to <rvalue>
		Possible conditions are:
		1 - greater or equal
		2 - greater
		3 - less or equal
		4 - less
		5 - equal
		6 - not equal
		Example: this code will show different animation frames depending of unit's current health:
		 Still = {"if-var v_HitPoints.Percent 50 3 damaged50",
			"frame 0", "wait 1", "frame 0", "wait 1","goto end",
			"label damaged50",
			"frame 1", "wait 1", "frame 1", "wait 1",
			"label end"}

	"set-var <var> <mod> <value>" - sets the current unit's <var> variable. <mod> specifies, how should be <value> applied to <var>:
		1 - <value> will be added to <var>'s current value.
		2 - <value> will be subtracted from <var>'s current value.
		3 - <var>'s current value will be multiplied to <value>.
		4 - <var>'s current value will be divided to <value>.
		5 - <var>'s current value will be divided to <value> and remainder will be taken as value.
			Warning: if <value> = 0 in 4 and 5, the game will bomb out with a error.
	"set-player-var <player> <var> <value> <mod>[ <argument>]" - sets the <player>'s <var>. The <value> and <mod> are used same as in set-var. Optional <argument> - specifies the <var>'s argument(need for resources and unit-types)
	"die[ <deathtype>]" - causes unit to die. If <deathtype> is set, unit will play his extra death animation depending on <deathtype>, if he has one.
[-]Health states in animations are removed, should use "if-var" animation to do this.

Patch frpm Cybermind
2012-02-18 17:21:40 +01:00
.bzr-builddeb add .bzr-builddeb dir for bzr builddeb 2010-05-14 14:25:20 +02:00
cmake/modules Revert file which should not be commited 2011-10-17 20:36:07 +02:00
debian Fixed compile errors on Maemo 2011-12-30 13:24:23 +01:00
doc Release version 2.2.6 2011-12-24 16:16:33 +01:00
gameheaders Fixed maemo-extract header 2012-01-02 11:37:51 +01:00
metaserver Fixed crashing metaserver at first start 2011-05-28 13:26:27 +02:00
po Moved international po files to po subdir 2011-03-26 23:34:16 +01:00
src [+]Integer constants in animations could be given as unit's or player's variables. 2012-02-18 17:21:40 +01:00
tools Fix compilation with MSVC 2012-02-14 12:01:26 +01:00
.bzrignore Update .bzrignore 2011-08-09 09:34:26 +02:00
CMakeLists.txt CMake: gcc - make sure that char is signed 2012-02-18 10:16:04 +01:00
COPYING added gpl 2003-07-03 16:10:29 +00:00
README Updated info in doc/changelog.html, renamed it to name with lower chars 2011-08-09 09:19:14 +02:00

    ________________________________README_________________________________
         _________ __                 __                               
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ | 
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/ 
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
           Stratagus - A free fantasy real time strategy game engine

Read 'doc/index.html' for general information and license information.
Read 'doc/install.html' for Stratagus installation instructions.
Read 'doc/changelog.html' for the Stratagus changelog.