Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifdef MULTIPLAYER
- [modification]
- id=mod_Switch_Leader
- name=_"Switch Leader"
- description=_"Allows players to replace a unit they own their original leader. Mainly intended for survival games."
- [options]
- [checkbox]
- id=mod_switch_leader_no_limit
- name=_"No limit"
- description=_"Whether each player should be able to name a new leader unlimited times within the same game."
- default=yes
- [/checkbox]
- [slider]
- id=mod_switch_leader_times
- name=_"Maximum times:"
- description=_"How many times should each player be allowed to switch leader. Only has effect if the No limit option is unchecked."
- min=1
- max=15
- step=1
- default=1
- [/slider]
- [/options]
- [event]
- name=prestart
- {VARIABLE mod_switch_leader_times_1 $mod_switch_leader_times}
- {VARIABLE mod_switch_leader_times_2 $mod_switch_leader_times}
- {VARIABLE mod_switch_leader_times_3 $mod_switch_leader_times}
- {VARIABLE mod_switch_leader_times_4 $mod_switch_leader_times}
- {VARIABLE mod_switch_leader_times_5 $mod_switch_leader_times}
- {VARIABLE mod_switch_leader_times_6 $mod_switch_leader_times}
- {VARIABLE mod_switch_leader_times_7 $mod_switch_leader_times}
- {VARIABLE mod_switch_leader_times_8 $mod_switch_leader_times}
- {VARIABLE mod_switch_leader_times_9 $mod_switch_leader_times}
- [set_menu_item]
- id=mod_switch_leader_menu
- description=_"Make this unit your leader"
- [show_if]
- [have_unit]
- x=$x1
- y=$y1
- side=$side_number
- canrecruit=no
- [/have_unit]
- [and]
- [variable]
- name=mod_switch_leader_times_$side_number
- greater_than=0
- [/variable]
- [or]
- [variable]
- name=mod_switch_leader_no_limit
- boolean_equals=true
- [/variable]
- [/or]
- [/and]
- [/show_if]
- [command]
- [modify_unit]
- [filter]
- side=$side_number
- canrecruit=yes
- [/filter]
- canrecruit=no
- [/modify_unit]
- [modify_unit]
- [filter]
- x=$x1
- y=$y1
- [/filter]
- canrecruit=yes
- [/modify_unit]
- [set_variable]
- name=mod_switch_leader_times_$side_number
- sub=1
- [/set_variable]
- [/command]
- [/set_menu_item]
- [/event]
- [/modification]
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement