Advertisement
Farbjodr

dummy scenario

Aug 15th, 2014
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.41 KB | None | 0 0
  1. [event]
  2. name=moveto
  3. first_time_only=no
  4. [store_unit_type_ids]
  5. variable=unit_types
  6. [/store_unit_type_ids]
  7. [set_variables]
  8. name=split_list
  9. mode=replace
  10. [split]
  11. list=$unit_types
  12. key=id
  13. separator=,
  14. remove_empty=yes
  15. [/split]
  16. [/set_variables]
  17. {VARIABLE output ""}
  18. {VARIABLE output1 ""}
  19. {VARIABLE output2 ""}
  20. {VARIABLE output3 ""}
  21. {VARIABLE output4 ""}
  22. {FOREACH split_list i}
  23. # dont want other eras
  24. [if]
  25. [variable]
  26. name=split_list[$i].id
  27. contains="AE"
  28. [/variable]
  29. [then]
  30. [set_variables]
  31. name=ageless_list
  32. mode=append
  33. [value]
  34. id=$split_list[$i].id
  35. [/value]
  36. [/set_variables]
  37. [/then]
  38. [/if]
  39. {NEXT i}
  40. {FOREACH ageless_list i}
  41. [unit]
  42. type=$ageless_list[$i].id
  43. side=2
  44. to_variable=unit
  45. [/unit]
  46. [if]
  47. [variable]
  48. name=unit.level
  49. equals=0
  50. [/variable]
  51. [then]
  52. [set_variables]
  53. name=units_zero
  54. mode=append
  55. [value]
  56. id=$ageless_list[$i].id
  57. [/value]
  58. [/set_variables]
  59. #{VARIABLE output ($output tmpdfbr $ageless_list[$i].id|)}
  60. # With Wesnoth 1.9, [set_variable]format= no longer exists. One must use [set_variable]value=. (See InternalActionsWML.) One should change every {VARIABLE_OP x format y} to {VARIABLE x y}.
  61. {VARIABLE output "$output,$ageless_list[$i].id"}
  62. [/then]
  63. [/if]
  64. [if]
  65. [variable]
  66. name=unit.level
  67. equals=1
  68. [/variable]
  69. [then]
  70. [set_variables]
  71. name=units_one
  72. mode=append
  73. [value]
  74. id=$ageless_list[$i].id
  75. [/value]
  76. [/set_variables]
  77. {VARIABLE output1 "$output1,$ageless_list[$i].id"}
  78. [/then]
  79. [/if]
  80. [if]
  81. [variable]
  82. name=unit.level
  83. equals=2
  84. [/variable]
  85. [then]
  86. [set_variables]
  87. name=units_two
  88. mode=append
  89. [value]
  90. id=$ageless_list[$i].id
  91. [/value]
  92. [/set_variables]
  93. {VARIABLE output2 "$output2,$ageless_list[$i].id"}
  94. [/then]
  95. [/if]
  96. [if]
  97. [variable]
  98. name=unit.level
  99. equals=3
  100. [/variable]
  101. [then]
  102. [set_variables]
  103. name=units_three
  104. mode=append
  105. [value]
  106. id=$ageless_list[$i].id
  107. [/value]
  108. [/set_variables]
  109. {VARIABLE output3 "$output3,$ageless_list[$i].id"}
  110. [/then]
  111. [/if]
  112. [if]
  113. [variable]
  114. name=unit.level
  115. equals=4
  116. [/variable]
  117. [then]
  118. [set_variables]
  119. name=units_four
  120. mode=append
  121. [value]
  122. id=$ageless_list[$i].id
  123. [/value]
  124. [/set_variables]
  125. {VARIABLE output4 "$output4,$ageless_list[$i].id"}
  126. [/then]
  127. [/if]
  128.  
  129.  
  130.  
  131. {NEXT i}
  132. [chat]
  133. message=_"0: $units_zero.length"
  134. [/chat]
  135. [chat]
  136. message=_"1: $units_one.length"
  137. [/chat]
  138. [chat]
  139. message=_"2: $units_two.length"
  140. [/chat]
  141. [chat]
  142. message=_"3: $units_three.length"
  143. [/chat]
  144. [chat]
  145. message=_"4: $units_four.length"
  146. [/chat]
  147. # ONLY ONE AT ONCE, one error >> that is hacky way to be able to copy this from stderr >> one error halts event, so uncomment new one and reload to get other levels
  148. #[unit]
  149. # type=$output
  150. # x=10
  151. # y=10
  152. # side=1
  153. #[/unit]
  154. #[unit]
  155. # type=$output1
  156. # x=10
  157. # y=10
  158. # side=1
  159. #[/unit]
  160. #[unit]
  161. # type=$output2
  162. # x=10
  163. # y=10
  164. # side=1
  165. #[/unit]
  166. #[unit]
  167. # type=$output3
  168. # x=10
  169. # y=10
  170. # side=1
  171. #[/unit]
  172. [unit]
  173. type=$output4
  174. x=10
  175. y=10
  176. side=1
  177. [/unit]
  178. [/event]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement