Little question about WML
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.
- Casual User
- Posts: 475
- Joined: March 11th, 2005, 5:05 pm
Little question about WML
Good afternoon!
Would it be possible to code in WML an event so that an unit reaching the border of the map is removed from the battlefield but placed in the recall list on the next scenario? If so, how?
I guess I could use [store_unit] in a variable and [unstore_unit] it just before the end of the scenario, but it would make things rather complicated.
What I am trying to do is to make it so that to win a scenario, you must move yourself and at least six other units to the border of the map. Using what I said above would be very difficult because the units in question aren't fixed.
Thanks in advance.
Would it be possible to code in WML an event so that an unit reaching the border of the map is removed from the battlefield but placed in the recall list on the next scenario? If so, how?
I guess I could use [store_unit] in a variable and [unstore_unit] it just before the end of the scenario, but it would make things rather complicated.
What I am trying to do is to make it so that to win a scenario, you must move yourself and at least six other units to the border of the map. Using what I said above would be very difficult because the units in question aren't fixed.
Thanks in advance.
Yeah, it don't know definetly if it will work, but you'll need to change the variable each time, so 7 copies of it otherwise it might overright it.
Code: Select all
[event]
moveto=0,0
#or wherever you want it to...
[store_unit]
[filter]
description=unit
#or the name of your leader
[/filter]
variable=survivor_1
kill=yes
[/store_unit]
[/event]
What you need to do is, in the start event, set variable counter=1. Then, have an event, with first_time_only=no, for whenever a unit on your side moves to the edge of the map. Store the unit that moved in the variable edgemover[$counter], then increase $counter by 1. After that, if $counter equals 7,8, or whatever is supposed to end the scenario, do an endlevel. Have a victory event that contains an unstoring-unit "for" loop.
If you need help writing that code, or if what I said didn't make sense, i can write a WML-snippet to show you how to do it.
If you need help writing that code, or if what I said didn't make sense, i can write a WML-snippet to show you how to do it.
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
And I hate stupid people.
The World of Orbivm
Listen to the guy with 3 campaigns under his belt, compared to the 1 with half one.turin wrote:What you need to do is, in the start event, set variable counter=1. Then, have an event, with first_time_only=no, for whenever a unit on your side moves to the edge of the map. Store the unit that moved in the variable edgemover[$counter], then increase $counter by 1. After that, if $counter equals 7,8, or whatever is supposed to end the scenario, do an endlevel. Have a victory event that contains an unstoring-unit "for" loop.
If you need help writing that code, or if what I said didn't make sense, i can write a WML-snippet to show you how to do it.
Two campaigns Disto? I thought you only did "A seed of Evil." Don't tell me you are one of the "official" programmers too?Disto wrote:
Listen to the guy with 3 campaigns under his belt, compared to the 1 with half one.
Creater of the campaign, "Northern Rebirth"
Compleater of the campaign, "Son of the Black Eye"
Compleater of the campaign, "Son of the Black Eye"
No....i'm the second guy i'm talking about. The one with a half a campaign, Turin's done 3.... And i'm not a "official" programmer. Where did that come from???Taurus wrote:Two campaigns Disto? I thought you only did "A seed of Evil." Don't tell me you are one of the "official" programmers too?Disto wrote:
Listen to the guy with 3 campaigns under his belt, compared to the 1 with half one.
Oh oops, I thought you said, "one and one half" campaigns, and since I only saw one on the campaign server, I thought you might have done one of the official ones. And hey, talking about official campaigns, how do they become official, is it just that the developers see them and think they are cool and bingo, they're part of the package?Disto wrote:
No....i'm the second guy i'm talking about. The one with a half a campaign, Turin's done 3.... And i'm not a "official" programmer. Where did that come from???
Creater of the campaign, "Northern Rebirth"
Compleater of the campaign, "Son of the Black Eye"
Compleater of the campaign, "Son of the Black Eye"
Well, sort of... another requirement is that they were selected before about November 2004. It was kind of a first-come-first-serve deal...Taurus wrote:Oh oops, I thought you said, "one and one half" campaigns, and since I only saw one on the campaign server, I thought you might have done one of the official ones. And hey, talking about official campaigns, how do they become official, is it just that the developers see them and think they are cool and bingo, they're part of the package?Disto wrote:
No....i'm the second guy i'm talking about. The one with a half a campaign, Turin's done 3.... And i'm not a "official" programmer. Where did that come from???
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
And I hate stupid people.
The World of Orbivm
So are the planning on adding any new campaigns or is it just going to be those 4? Or is it one of those questions when nobody knows the answer?turin wrote: Well, sort of... another requirement is that they were selected before about November 2004. It was kind of a first-come-first-serve deal...
Creater of the campaign, "Northern Rebirth"
Compleater of the campaign, "Son of the Black Eye"
Compleater of the campaign, "Son of the Black Eye"
It is planned to add new campaigns after 1.0 probably even into 1.0.x provided that they're complete and supported. Adding new ones before 1.0 would have made the job of translators quite a bit more difficult then it already is. So getting much translations for a campaign through WesCamp may also help it to become official. At the very least, translations show that some people like the campaign enough to spent the time translating it.