UserAgent: Mozilla (X11; I; Linux 2.0.32 i586) IP: 148.244.150.58 URI: http://wesnoth.slack.it/?VariablesWML - - - - - Index: VariablesWML =================================================================== RCS file: /home/wesnoth/cvsroot/wikiroot/VariablesWML,v retrieving revision 1.13 diff -u -r1.13 VariablesWML --- VariablesWML 11 Jul 2005 18:43:13 -0000 1.13 +++ VariablesWML 24 Jul 2005 13:59:08 -0000 @@ -1,20 +1,36 @@ +When I put the shoes on, I thought I looked good in the full length mirror Sperm Eater [[http://alexhomepage.freewebpage.org/sperm/eater.html Sperm Eater]] + Finance Party [[http://goncharhome.freewebsites.com/finance/company.html Finance Company]] + Substitution New Stock York [[http://gonchar.mvhosted.com/exchange/new-stock-york.html Exchange Fresh Stock York]] + Pfizer And Lipitor [[http://alexhome.blog-journals.com/pfizer/and-lipitor.html Pfizer And Lipitor]] + Encrypt Music Xanga [[http://jhonson.mvhosted.com/code/music-xanga.html Encipher Music Xanga]] + Ebola Virus [[http://jivoderhome.hippocollector.com/ebola/virus.html Ebola Virus]] + College Football Recruit [[http://jhonsonhome.teenposes.com/college-football-recruit.html College Football Recruit]] + Brazil Trip [[http://alexhomepage.esmartdesign.com/brazil-travel.html Brazil Travel]] + Half Ebay [[http://fedoraptekar.webyar.com/half-ebay.html Half Ebay]] + Britney Raw Spear [[http://gonchar34.webyar.com/britney-naked-spear.html Britney Nude Gig]] + Downloads Livewire Music [[http://jhonson.mvhosted.com/downloads-livewire-music.html Downloads Livewire Music]] + Cruise Deal [[http://alexhome.climaxmature.com/cruise/deal.html Cruise Distribute]] + Injurious Twin Gambol Ka [[http://jhonsonhome.fbhosting.com/evil-twin-sport-ka.html Malefic Couple Sport Ka]] + Coldwell Banker Realtor [[http://jhonsonhome.freewebpage.org/coldwell/banker-realtor.html Coldwell Banker Realtor]] + Cholesterol Lipitor [[http://alexhome.blog-journals.com/cholesterol-lipitor.html Cholesterol Lipitor]] + Banker Investment [[http://jhonsonhome.freewebpage.org/banker/investment.html Banker Investment]] + Biltmore Estate [[http://jhonsonhome.e2uhosting.com/biltmore/estate.html Biltmore Acres]] + Auction Patrol [[http://ruddyhome.webyar.com/auction/police.html Auction Law]] + Make Paxil Weight [[http://alexhome.e2uhosting.com/gain/paxil-weight.html Win Paxil Angle]] + Free Money Search Unclaimed [[http://gonchar.esmartbuyer.com/free/money-search-unclaimed.html Free Money Explore Unclaimed]] + She spun away and took a single stroke but it was too late ||The [variables] tag|| - The [variables] savegame element describes the value of all variables during a savegame. It can input any key/tags. Although [variables] is not directly used in the game, it is used for internal processing. - Each key of [variables] describes a //WML variable//. When WML in a savegame is proccessed, then the values of certain expressions can be dependent on the current values of WML variables. - There are two main ways for a WML user to use variables. One is the [variable] tag (see [if], InternalActionsWML), which is used to execute different actions based on facts about variables. The other is with the dollar sign(||$||). - ||The dollar sign($)|| - The dollar sign is used to input the value of a variable into an attribute. For example the attribute ||turns=$turns|| is a way to set the number of turns in a scenario to a particular variable. However, not all attributes allow variables: @@ -24,20 +40,18 @@ Of course when that variable is used then the dollar sign will be interpreted normally. It can also be used in an attribute of [scenario] (see ScenarioWML); in this case the value will be determined at the beginning of the scenario, and then be unmodifiable. - If ||//variable//=//value//|| is an attribute in [variables], then the expression ||$//variable//|| is a shortcut to //value//. - -If ||[//array//]|| is a tag in [variables], then ||$//array//.//variable//|| +If ||[//arra +a1b +y//]|| is a tag in [variables], then ||$//array//.//variable//|| has the same value as ||$//variable//|| does in [//array//]. For example if [array] contains the attribute ||variable=value||, then the expression ||$array.variable|| will be interpreted as ||value||. - However array variables are currently only interpreted in the keys //name//,//format//,//to_variable//([set_variable],InternalActionsWML), //message//([message],InterfaceActionsWML), and //variable// ([unstore_unit],DirectActionsWML) - You may use | to specify the end of a variable name in those places that array variables are allowed, if what follows the variable name is not a space, and it will be removed afterwards (even if it's not at the end of a variable name). For example, if the @@ -48,9 +62,7 @@ more characters are: $characters|fish will result in more characters are: catfish - If there are multiple [//array//]s, then the //n//th [//array//] is described by the expression ||//array//[//n//]||. - Example: [variables] variableone=one @@ -64,20 +76,13 @@ [/variablethree] [/variabletwo] [/variables] - in a [message]: message="$variableone is 1 $variabletwo.variabletwo is 2 $variabletwo.variablethree[0].variablethree is 3" - is displayed as one is 1 two is 2 three is 3 - ||See Also|| - -* <A HREF="http://www.wesnoth.org/forum/viewtopic.php?p=69820#69820">Cyberjack's guide to variable expansion</A> -* SyntaxWML -* SavefileWML -* ReferenceWML +*
_______________________________________________ Wesnoth-wiki-changes mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/wesnoth-wiki-changes
