Some WML help please
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.
Some WML help please
Then, me again asking for help to the WML great sages. This time I have some tasks that I don't know how to code. The first one is this: I have an unit that when it dies the units (friends or enemies) in the abyacent hexagons must die. How I must do it? In the unit .cfg file.
The second one: How I must that a unit that can't die because you lose the scenario, after turn 10 can die then. I must change the event of defeat or what?
Third one: How I code something which have to happen 1 turn after you reach a place?
Thanks for your time and help.
The second one: How I must that a unit that can't die because you lose the scenario, after turn 10 can die then. I must change the event of defeat or what?
Third one: How I code something which have to happen 1 turn after you reach a place?
Thanks for your time and help.
"I was pulling a barrow, when I saw a stalking horse
what a beautiful day!- he said- for visiting a red herring
and getting hoarse."
Working on this campaign: The septentrional tower
what a beautiful day!- he said- for visiting a red herring
and getting hoarse."
Working on this campaign: The septentrional tower
-
- Posts: 1549
- Joined: June 18th, 2009, 1:45 am
Re: Some WML help please
1.
2.
Code: Select all
[event]
name=die
[filter]
type=PUT UNIT TYPE HERE
[/filter]
[kill]
[filter_location]
x,y=$x1,$y1
radius=1
[/filter_location]
[/kill]
[/event]
Code: Select all
[event]
name=turn 10
{VARIABLE after_10 yes}
[/event]
[event]
name=die
[filter]
PUT FILTER HERE
[/filter]
[if]
[variable]
name=after_10
boolean_equals=yes
[/variable]
[then]
....
[/then]
[else]
....
[endlevel]
result=defeat
[/endlevel]
[/else]
[/if]
[/event]
Re: Some WML help please
3.
Code: Select all
[event]
name=moveto
[filter]
PUT LOCATION HERE
[/filter]
[set_variable]
name=tt
value=1
[/set_variable]
[/event]
[event]
name=WHERE IN THE TURN YOU WANT IT TO HAPPEN
[if]
[variable]
name=tt
equals=1
[/variable]
[then]
.........
[/then]
[/if]
[/event]
Re: Some WML help please
or..
3.
3.
Code: Select all
[event]
name=moveto
[filter]
#who can trigger it
[/filter]
#put location here
[event]
name=turn refresh
#specify for whom it is to happen
side=
#what happens goes here
[/event]
[/event]
Like cats? I've made a whole faction of them to kick ass with!
Don't like cats? I've made a whole faction of them to kick their asses! So everyone's happy :)
Felinian faction is part of the Beyond Southern Hells era
kitties need sprites! art topic here
Don't like cats? I've made a whole faction of them to kick their asses! So everyone's happy :)
Felinian faction is part of the Beyond Southern Hells era
kitties need sprites! art topic here
Re: Some WML help please
But i don't understand. Kapue I don't know the turn in wich it will happen. I only know that It will one turn after you reach the place.
St Drake, If the event is a terrain change it must be something like that?:
St Drake, If the event is a terrain change it must be something like that?:
Code: Select all
[event]
name=moveto
[filter]
unit_type=explosive-caravan
x=18
y=32
[/filter]
[event]
name=turn refresh
[terrain]
x=17-19
y=31-33
terrain=Ds
[/terrain]
[/event]
[/event]
"I was pulling a barrow, when I saw a stalking horse
what a beautiful day!- he said- for visiting a red herring
and getting hoarse."
Working on this campaign: The septentrional tower
what a beautiful day!- he said- for visiting a red herring
and getting hoarse."
Working on this campaign: The septentrional tower
Re: Some WML help please
You are confused about this line?perseo wrote:But i don't understand. Kapue I don't know the turn in wich it will happen. I only know that It will one turn after you reach the place.
Code: Select all
[event]
name=WHERE IN THE TURN YOU WANT IT TO HAPPEN
[if]
....
name=new_turn
Or if you wanted it at the end of the the turn then it would be
name=end_turn
-
- Posts: 126
- Joined: March 3rd, 2011, 7:14 pm
Re: Some WML help please
Hey, just a quick question, because the first answer sparked my interest.
If you set up a win condition unit (the one you have to kill) that would kill everything (radius=50 or something), but you have heroes that aren't allowed to die, how would you make the game kill the unit, wipe everyone out, but give you the win before it realised that you had lost your heroes?
If you set up a win condition unit (the one you have to kill) that would kill everything (radius=50 or something), but you have heroes that aren't allowed to die, how would you make the game kill the unit, wipe everyone out, but give you the win before it realised that you had lost your heroes?
Re: Some WML help please
@Rowan - use fire_event=no in the kill tag
I don't have experience with using the terrain tag, but it looks like it should work..perhaps just 'new turn' is indeed a better choice than 'turn refresh', I used the latter cause I'm used to eras and expected to see a side= to specify on whos turn it would fire
I don't have experience with using the terrain tag, but it looks like it should work..perhaps just 'new turn' is indeed a better choice than 'turn refresh', I used the latter cause I'm used to eras and expected to see a side= to specify on whos turn it would fire
Like cats? I've made a whole faction of them to kick ass with!
Don't like cats? I've made a whole faction of them to kick their asses! So everyone's happy :)
Felinian faction is part of the Beyond Southern Hells era
kitties need sprites! art topic here
Don't like cats? I've made a whole faction of them to kick their asses! So everyone's happy :)
Felinian faction is part of the Beyond Southern Hells era
kitties need sprites! art topic here
Re: Some WML help please
@ Kapue: Srry I didn't read it well...
@ St Drake:Thank you very much. The answer to Rowan was useful for me too.
Then other one thing: If I want a unit who has the AI special: guardian to move between two points like patrolling. I must code all the movements or there's a shortcut for doing it. (The scenario has 32 turns and there are more than one unit doing that so coding all the movements is a hell). I was thinking in a macro who says that in pair turns move to point "A" and in unpair turns move tu point "B". But I don't know how to do it.
Thanks for your help (as always).
@ St Drake:Thank you very much. The answer to Rowan was useful for me too.
Then other one thing: If I want a unit who has the AI special: guardian to move between two points like patrolling. I must code all the movements or there's a shortcut for doing it. (The scenario has 32 turns and there are more than one unit doing that so coding all the movements is a hell). I was thinking in a macro who says that in pair turns move to point "A" and in unpair turns move tu point "B". But I don't know how to do it.
Thanks for your help (as always).
"I was pulling a barrow, when I saw a stalking horse
what a beautiful day!- he said- for visiting a red herring
and getting hoarse."
Working on this campaign: The septentrional tower
what a beautiful day!- he said- for visiting a red herring
and getting hoarse."
Working on this campaign: The septentrional tower
-
- Posts: 126
- Joined: March 3rd, 2011, 7:14 pm
Re: Some WML help please
Wouldn't that just stop the event from going off, so no-one would die?StDrake wrote:@Rowan - use fire_event=no in the kill tag
I don't have experience with using the terrain tag, but it looks like it should work..perhaps just 'new turn' is indeed a better choice than 'turn refresh', I used the latter cause I'm used to eras and expected to see a side= to specify on whos turn it would fire
Re: Some WML help please
No. fire_event=no prevents external death events (those triggered by the event in question) from being fired, but the killing happens as per usual.Rowanthepreacher wrote:Wouldn't that just stop the event from going off, so no-one would die?StDrake wrote:@Rowan - use fire_event=no in the kill tag
I don't have experience with using the terrain tag, but it looks like it should work..perhaps just 'new turn' is indeed a better choice than 'turn refresh', I used the latter cause I'm used to eras and expected to see a side= to specify on whos turn it would fire
-
- Posts: 126
- Joined: March 3rd, 2011, 7:14 pm
Re: Some WML help please
Ohhhhh. Cool. Cheers, guys.