Re-using events?

The place to post your WML questions and answers.

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.
Post Reply
Haravikk
Posts: 11
Joined: May 15th, 2006, 1:44 pm

Re-using events?

Post by Haravikk »

Hey there!

I've recently got into making scenarios for BfW, and I'm already trying some more complicated commands in it, however I'm currently stuck.

Basically, what I want to do is have a counter listing how many units of a given type are dead. So I figured a name=die event would suffice for this, however, it only triggers once.
Okay...

So now what I would like to do is try and find a way to re-use my death event, either by somehow allowing it to be triggered repeatedly, or by having it replace itself.
However I'm not sure how to do either of these, and I'd rather not have to create an event for each unit as it seems very wasteful.

Is there an easy way to do this that I've missed?

Thanks!
Being Haravikk gets you girls like these:
image removed
scott
Posts: 5248
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Re: Re-using events?

Post by scott »

Haravikk wrote:Hey there!

I've recently got into making scenarios for BfW, and I'm already trying some more complicated commands in it, however I'm currently stuck.

Basically, what I want to do is have a counter listing how many units of a given type are dead. So I figured a name=die event would suffice for this, however, it only triggers once.
Okay...

So now what I would like to do is try and find a way to re-use my death event, either by somehow allowing it to be triggered repeatedly, or by having it replace itself.
However I'm not sure how to do either of these, and I'd rather not have to create an event for each unit as it seems very wasteful.

Is there an easy way to do this that I've missed?

Thanks!
[event]
name=die
first_time_only=no
[filter]
type=...
side=... (if desired)
[/filter]

etc...

[/event]
Hope springs eternal.
Wesnoth acronym guide.
Haravikk
Posts: 11
Joined: May 15th, 2006, 1:44 pm

Post by Haravikk »

Ack, it would be something simple wouldn't it? Heh, was driving me nuts.

Thanks scott! That's that one working perfectly now, 2 down, at least one more map to go (though much simpler objective fortunately :))
Being Haravikk gets you girls like these:
image removed
Post Reply