Bitrons WML Questions
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Re: Bitrons WML Questions
Well, I tried to fix it by defining a time_area at x,y=0,0 in a prestart event, but that didn't help.
Developer of Project Haldric
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Re: Bitrons WML Questions
hmm that's suprising, and you made sure to refresh your wml (F5) ?
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
Re: Bitrons WML Questions
I quit the game, rewrote the WML (I added the prestart event into the very same macro), saved, and started the game again.
Code: Select all
[event]
name=start
[time_area]
x,y=1,1
{UNDERGROUND}
[/time_area]
[/event]
[event]
name=prerecruit
first_time_only=no
[filter]
type_adv_tree=Vampire Deformity
[/filter]
[store_time_of_day]
[/store_time_of_day]
[if]
[variable]
name=time_of_day.lawful_bonus
less_than_equal_to=0
[/variable]
[then]
[unpetrify]
type_adv_tree=Vampire Deformity
side=$side_number
[/unpetrify]
[/then]
[else]
[petrify]
type_adv_tree=Vampire Deformity
side=$side_number
[not]
[filter_location]
area=underground
[/filter_location]
[/not]
[/petrify]
[/else]
[/if]
[/event]
[event]
name=turn refresh
first_time_only=no
[store_time_of_day]
[/store_time_of_day]
[if]
[variable]
name=time_of_day.lawful_bonus
less_than_equal_to=0
[/variable]
[then]
[unpetrify]
type_adv_tree=Vampire Deformity
side=$side_number
[/unpetrify]
[/then]
[else]
[heal_unit]
[filter]
type_adv_tree=Vampire Deformity
side=$side_number
[not]
[filter_location]
area=underground
[/filter_location]
[/not]
[/filter]
amount=10
animate=yes
restore_statuses=yes
[/heal_unit]
[petrify]
type_adv_tree=Vampire Deformity
side=$side_number
[not]
[filter_location]
area=underground
[/filter_location]
[/not]
[/petrify]
[/else]
[/if]
[/event]
#enddef
Developer of Project Haldric
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Add-ons: Millennium Era, Vision of a Shaman, A New Home
Art: Bitron's Art Thread
Tools: WML Syntax Highlighter for VS Code
Re: Bitrons WML Questions
hmm ok i just tested it myself:
test code:
(code from a menu items) and it crashes but when i uncomment the [time_area] part it does no longer crash.
test code:
Code: Select all
--wesnoth.wml_actions.time_area { x=4, y=4, T.time {}, }
wesnoth.match_location(5,5, { area = "underground"})
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.