lesnospa.blogg.se

Age of mythology editor guide
Age of mythology editor guide









age of mythology editor guide

To use an XS script in a Random Map Script, do the following: you want to chat the amount of food a player has) you must initialize your parameter variables.Įxample on how a function written inside the editor looks: If you want to write a function which accepts parameters (e.g.

age of mythology editor guide

How to write functions which accept parameters: if there is 2 players in a match, only 2 is returned. Returns the number of players in a match (Excluding Gaia) E.g. XsSetPlayerAttribute(long playerId, long attribute, float value) Sets the desired player attribute to the value specified. XsPlayerAttribute(long playerId, long attribute) Returns the value of the desired player attribute. XsChatData(“Player one food: %d”, food) Sends a chat with the desired message/variable. XsEffectAmount(cModResource, cAttributeStone, cSetAttribute, 50, -1) Modify players starting resources, in this case, set starting stone to 50. XsEffectAmount(long effect, long itemName, long type, float value, long playerId)

age of mythology editor guide

Set playerId to -1 to apply the change to all players. XsSetTriggerVariable(long triggerVariableId, long value)Īllows you to modify a unit or building with research-style type effects. Sets a trigger variable to the desired value. Returns the value of Trigger Variable 0. XsTriggerVariable(long triggerVariableId) Returns the value of the desired Trigger Variable. if you had a function called doesPlayerHaveFood() you will only need to write doesPlayerHaveFood in the Script Call textbox.)

  • To call functions in the Editor, you only need to pass in the function name (e.g.
  • You can define as many functions as you want inside an.
  • When entering the Script Name inside the Editor, you do not need to include the final.
  • These functions will be called automatically for that specific Script Call.
  • If you wrote a function inside of the Scenario Editor, it will be compiled into an.
  • bool Function() should return a boolean expression)
  • Make sure the function returns the defined type (e.g.
  • having multiple functions called Function() will cause a conflict) It adds another layer of scripting functionality to the existing trigger system in the scenario editor.īelow, you can find a quick introduction and some examples of the new functionality. xs scripting for is a new functionality added to Age of Empires II: Definitive Edition, available with the November 2020 update.











    Age of mythology editor guide