[Go back to index]

Asobo\Generic\Updates.xml

Source XML
<ModelBehaviors> <Include RelativeFile="Subtemplates\\Updates_Subtemplates.xml"/> <!-- ####################################################################### --> <!-- ######################### Update Templates ########################## --> <!-- ####################################################################### --> <!-- This template is used to ensure switches that have multiple state have the right state if their Simvar is changed. This should be the only entry point. Do not call GT_Update_EnsureVariableConsistency_MultiStates_ParamSetup_XStates. NUM_STATES can be set to decide how many states the switch should have. --> <Template Name = "ASOBO_GT_Update_EnsureVariableConsistency_MultiStates"> <DefaultTemplateParameters> <NUM_STATES>2</NUM_STATES> <SWITCH_POSITION_TYPE>O</SWITCH_POSITION_TYPE> <SWITCH_POSITION_VAR>SwitchState</SWITCH_POSITION_VAR> <INIT_VARS/> <UPDATE_STATES/> </DefaultTemplateParameters> <UseTemplate Name="ASOBO_GT_Update_EnsureVariableConsistency_MultiStates_ParamSetup"> </UseTemplate> </Template> <Template Name = "ASOBO_GT_Update_SmoothLeverMovement"> <Parameters Type="Default"> <DRAG_ANIMATION_VARIABLE_TYPE>O</DRAG_ANIMATION_VARIABLE_TYPE> <DRAG_ANIMATION_VARIABLE_NAME>XMLVAR_#NODE_ID#_Animation_Position</DRAG_ANIMATION_VARIABLE_NAME> <DRAG_ANIMATION_TARGET_VARIABLE_TYPE>O</DRAG_ANIMATION_TARGET_VARIABLE_TYPE> <DRAG_ANIMATION_TARGET_VARIABLE_NAME>XMLVAR_#NODE_ID#_Animation_Target_Position</DRAG_ANIMATION_TARGET_VARIABLE_NAME> <PERCENT_PER_SECONDS>100</PERCENT_PER_SECONDS> <FREQUENCY>30</FREQUENCY> </Parameters> <Parameters Type="Override"> <CHECK_SETTER_FAR_FROM_TARGET>#ANIMATION_CODE_SETTER# (#DRAG_ANIMATION_TARGET_VARIABLE_TYPE#:#DRAG_ANIMATION_TARGET_VARIABLE_NAME#) - abs 0.1 &gt;</CHECK_SETTER_FAR_FROM_TARGET> <CHECK_ANIM_FAR_FROM_TARGET>(#DRAG_ANIMATION_VARIABLE_TYPE#:#DRAG_ANIMATION_VARIABLE_NAME#) l0 - abs 0.1 &gt;</CHECK_ANIM_FAR_FROM_TARGET> <Condition Valid="IS_LOOPING"> <True> <SET_TARGET> (#DRAG_ANIMATION_TARGET_VARIABLE_TYPE#:#DRAG_ANIMATION_TARGET_VARIABLE_NAME#) (#DRAG_ANIMATION_VARIABLE_TYPE#:#DRAG_ANIMATION_VARIABLE_NAME#) - abs #ANIM_LENGTH# 0.5 * &lt;= if{ (#DRAG_ANIMATION_TARGET_VARIABLE_TYPE#:#DRAG_ANIMATION_TARGET_VARIABLE_NAME#) sp0 } els{ (#DRAG_ANIMATION_TARGET_VARIABLE_TYPE#:#DRAG_ANIMATION_TARGET_VARIABLE_NAME#) #ANIM_LENGTH# 0.5 * &lt; if{ #ANIM_LENGTH# (#DRAG_ANIMATION_TARGET_VARIABLE_TYPE#:#DRAG_ANIMATION_TARGET_VARIABLE_NAME#) + sp0 } els{ (#DRAG_ANIMATION_TARGET_VARIABLE_TYPE#:#DRAG_ANIMATION_TARGET_VARIABLE_NAME#) #ANIM_LENGTH# - sp0 } } </SET_TARGET> </True> <False> <SET_TARGET>(#DRAG_ANIMATION_TARGET_VARIABLE_TYPE#:#DRAG_ANIMATION_TARGET_VARIABLE_NAME#) sp0</SET_TARGET> </False> </Condition> </Parameters> <UseTemplate Name="ASOBO_GT_Update"> <UPDATE_CODE> #CHECK_SETTER_FAR_FROM_TARGET# if{ #ANIMATION_CODE_SETTER# (&gt;#DRAG_ANIMATION_TARGET_VARIABLE_TYPE#:#DRAG_ANIMATION_TARGET_VARIABLE_NAME#) } #SET_TARGET# #CHECK_ANIM_FAR_FROM_TARGET# if{ (#DRAG_ANIMATION_VARIABLE_TYPE#:#DRAG_ANIMATION_VARIABLE_NAME#) l0 &gt; if{ (#DRAG_ANIMATION_VARIABLE_TYPE#:#DRAG_ANIMATION_VARIABLE_NAME#) #PERCENT_PER_SECONDS# #FREQUENCY# / - l0 max (&gt;#DRAG_ANIMATION_VARIABLE_TYPE#:#DRAG_ANIMATION_VARIABLE_NAME#) } els{ (#DRAG_ANIMATION_VARIABLE_TYPE#:#DRAG_ANIMATION_VARIABLE_NAME#) #PERCENT_PER_SECONDS# #FREQUENCY# / + l0 min (&gt;#DRAG_ANIMATION_VARIABLE_TYPE#:#DRAG_ANIMATION_VARIABLE_NAME#) } } els{ (#DRAG_ANIMATION_TARGET_VARIABLE_TYPE#:#DRAG_ANIMATION_TARGET_VARIABLE_NAME#) (&gt;#DRAG_ANIMATION_VARIABLE_TYPE#:#DRAG_ANIMATION_VARIABLE_NAME#) } </UPDATE_CODE> </UseTemplate> </Template> <Template Name="ASOBO_GT_Update"> <DefaultTemplateParameters> <FREQUENCY>1</FREQUENCY> <UPDATE_CODE></UPDATE_CODE> <INTERACTION_MODEL>All</INTERACTION_MODEL> </DefaultTemplateParameters> <Condition Check="UPDATE_ONCE"> <True> <Update Once="True" InteractionModel="#INTERACTION_MODEL#"> #UPDATE_CODE# </Update> </True> <False> <Update Frequency="#FREQUENCY#" InteractionModel="#INTERACTION_MODEL#"> #UPDATE_CODE# </Update> </False> </Condition> </Template> </ModelBehaviors>

Includes

Templates

Template list
  • ASOBO_GT_Update_EnsureVariableConsistency_MultiStates

    Definition from XML
    <Template Name="ASOBO_GT_Update_EnsureVariableConsistency_MultiStates"> <DefaultTemplateParameters> <NUM_STATES>2</NUM_STATES> <SWITCH_POSITION_TYPE>O</SWITCH_POSITION_TYPE> <SWITCH_POSITION_VAR>SwitchState</SWITCH_POSITION_VAR> <INIT_VARS/> <UPDATE_STATES/> </DefaultTemplateParameters> <UseTemplate Name="ASOBO_GT_Update_EnsureVariableConsistency_MultiStates_ParamSetup"/> </Template>

    Parameters initialization:

    • Default

      Parameters set:

      • NUM_STATES
      • SWITCH_POSITION_TYPE
      • SWITCH_POSITION_VAR
      • INIT_VARS
      • UPDATE_STATES
  • ASOBO_GT_Update_SmoothLeverMovement

    Definition from XML
    <Template Name="ASOBO_GT_Update_SmoothLeverMovement"> <Parameters Type="Default"> <DRAG_ANIMATION_VARIABLE_TYPE>O</DRAG_ANIMATION_VARIABLE_TYPE> <DRAG_ANIMATION_VARIABLE_NAME>XMLVAR_#NODE_ID#_Animation_Position</DRAG_ANIMATION_VARIABLE_NAME> <DRAG_ANIMATION_TARGET_VARIABLE_TYPE>O</DRAG_ANIMATION_TARGET_VARIABLE_TYPE> <DRAG_ANIMATION_TARGET_VARIABLE_NAME>XMLVAR_#NODE_ID#_Animation_Target_Position</DRAG_ANIMATION_TARGET_VARIABLE_NAME> <PERCENT_PER_SECONDS>100</PERCENT_PER_SECONDS> <FREQUENCY>30</FREQUENCY> </Parameters> <Parameters Type="Override"> <CHECK_SETTER_FAR_FROM_TARGET>#ANIMATION_CODE_SETTER# (#DRAG_ANIMATION_TARGET_VARIABLE_TYPE#:#DRAG_ANIMATION_TARGET_VARIABLE_NAME#) - abs 0.1 &gt;</CHECK_SETTER_FAR_FROM_TARGET> <CHECK_ANIM_FAR_FROM_TARGET>(#DRAG_ANIMATION_VARIABLE_TYPE#:#DRAG_ANIMATION_VARIABLE_NAME#) l0 - abs 0.1 &gt;</CHECK_ANIM_FAR_FROM_TARGET> <Condition Valid="IS_LOOPING"> <True> <SET_TARGET> (#DRAG_ANIMATION_TARGET_VARIABLE_TYPE#:#DRAG_ANIMATION_TARGET_VARIABLE_NAME#) (#DRAG_ANIMATION_VARIABLE_TYPE#:#DRAG_ANIMATION_VARIABLE_NAME#) - abs #ANIM_LENGTH# 0.5 * &lt;= if{ (#DRAG_ANIMATION_TARGET_VARIABLE_TYPE#:#DRAG_ANIMATION_TARGET_VARIABLE_NAME#) sp0 } els{ (#DRAG_ANIMATION_TARGET_VARIABLE_TYPE#:#DRAG_ANIMATION_TARGET_VARIABLE_NAME#) #ANIM_LENGTH# 0.5 * &lt; if{ #ANIM_LENGTH# (#DRAG_ANIMATION_TARGET_VARIABLE_TYPE#:#DRAG_ANIMATION_TARGET_VARIABLE_NAME#) + sp0 } els{ (#DRAG_ANIMATION_TARGET_VARIABLE_TYPE#:#DRAG_ANIMATION_TARGET_VARIABLE_NAME#) #ANIM_LENGTH# - sp0 } } </SET_TARGET> </True> <False> <SET_TARGET>(#DRAG_ANIMATION_TARGET_VARIABLE_TYPE#:#DRAG_ANIMATION_TARGET_VARIABLE_NAME#) sp0</SET_TARGET> </False> </Condition> </Parameters> <UseTemplate Name="ASOBO_GT_Update"> <UPDATE_CODE> #CHECK_SETTER_FAR_FROM_TARGET# if{ #ANIMATION_CODE_SETTER# (&gt;#DRAG_ANIMATION_TARGET_VARIABLE_TYPE#:#DRAG_ANIMATION_TARGET_VARIABLE_NAME#) } #SET_TARGET# #CHECK_ANIM_FAR_FROM_TARGET# if{ (#DRAG_ANIMATION_VARIABLE_TYPE#:#DRAG_ANIMATION_VARIABLE_NAME#) l0 &gt; if{ (#DRAG_ANIMATION_VARIABLE_TYPE#:#DRAG_ANIMATION_VARIABLE_NAME#) #PERCENT_PER_SECONDS# #FREQUENCY# / - l0 max (&gt;#DRAG_ANIMATION_VARIABLE_TYPE#:#DRAG_ANIMATION_VARIABLE_NAME#) } els{ (#DRAG_ANIMATION_VARIABLE_TYPE#:#DRAG_ANIMATION_VARIABLE_NAME#) #PERCENT_PER_SECONDS# #FREQUENCY# / + l0 min (&gt;#DRAG_ANIMATION_VARIABLE_TYPE#:#DRAG_ANIMATION_VARIABLE_NAME#) } } els{ (#DRAG_ANIMATION_TARGET_VARIABLE_TYPE#:#DRAG_ANIMATION_TARGET_VARIABLE_NAME#) (&gt;#DRAG_ANIMATION_VARIABLE_TYPE#:#DRAG_ANIMATION_VARIABLE_NAME#) } </UPDATE_CODE> </UseTemplate> </Template>

    Parameters initialization:

    • Default

      Parameters set:

      • DRAG_ANIMATION_VARIABLE_TYPE
      • DRAG_ANIMATION_VARIABLE_NAME (using NODE_ID)
      • DRAG_ANIMATION_TARGET_VARIABLE_TYPE
      • DRAG_ANIMATION_TARGET_VARIABLE_NAME (using NODE_ID)
      • PERCENT_PER_SECONDS
      • FREQUENCY
    • Override

      Parameters set:

      • CHECK_SETTER_FAR_FROM_TARGET (using ANIMATION_CODE_SETTER, DRAG_ANIMATION_TARGET_VARIABLE_TYPE, DRAG_ANIMATION_TARGET_VARIABLE_NAME)
      • CHECK_ANIM_FAR_FROM_TARGET (using DRAG_ANIMATION_VARIABLE_TYPE, DRAG_ANIMATION_VARIABLE_NAME)

      Condition: Valid(IS_LOOPING)

      • Case: True

        Parameters set:

        • SET_TARGET (using DRAG_ANIMATION_TARGET_VARIABLE_TYPE, DRAG_ANIMATION_TARGET_VARIABLE_NAME, DRAG_ANIMATION_VARIABLE_TYPE, DRAG_ANIMATION_VARIABLE_NAME, ANIM_LENGTH)
      • Case: False

        Parameters set:

        • SET_TARGET (using DRAG_ANIMATION_TARGET_VARIABLE_TYPE, DRAG_ANIMATION_TARGET_VARIABLE_NAME)

    Templates used:

    • ASOBO_GT_Update

      Parameters set:

      • UPDATE_CODE (using CHECK_SETTER_FAR_FROM_TARGET, ANIMATION_CODE_SETTER, DRAG_ANIMATION_TARGET_VARIABLE_TYPE, DRAG_ANIMATION_TARGET_VARIABLE_NAME, SET_TARGET, CHECK_ANIM_FAR_FROM_TARGET, DRAG_ANIMATION_VARIABLE_TYPE, DRAG_ANIMATION_VARIABLE_NAME, PERCENT_PER_SECONDS, FREQUENCY)
  • ASOBO_GT_Update

    Definition from XML
    <Template Name="ASOBO_GT_Update"> <DefaultTemplateParameters> <FREQUENCY>1</FREQUENCY> <UPDATE_CODE/> <INTERACTION_MODEL>All</INTERACTION_MODEL> </DefaultTemplateParameters> <Condition Check="UPDATE_ONCE"> <True> <Update Once="True" InteractionModel="#INTERACTION_MODEL#"> #UPDATE_CODE# </Update> </True> <False> <Update Frequency="#FREQUENCY#" InteractionModel="#INTERACTION_MODEL#"> #UPDATE_CODE# </Update> </False> </Condition> </Template>

    Parameters initialization:

    • Default

      Parameters set:

      • FREQUENCY
      • UPDATE_CODE
      • INTERACTION_MODEL

    Condition: Check(UPDATE_ONCE)

    • Case: True

      Parameters read:

      • INTERACTION_MODEL
      • UPDATE_CODE
    • Case: False

      Parameters read:

      • FREQUENCY
      • INTERACTION_MODEL
      • UPDATE_CODE