Conditions unit/weapon/target killed

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
Velensk
Multiplayer Contributor
Posts: 4002
Joined: January 24th, 2007, 12:56 am

Conditions unit/weapon/target killed

Post by Velensk »

In the final senario for my campin, I need a certain unit to kill a certain enemy with a certain attack. The problem is that I can't attach a filter for the weapon to a "die" event, and I don't know if I can attach a "target dies" condition to an attack ends event. If this is possible then I'd like to know the reckomended way of going about it, if it is not then I'll figure out a way to get around it storywise.
"There are two kinds of old men in the world. The kind who didn't go to war and who say that they should have lived fast died young and left a handsome corpse and the old men who did go to war and who say that there is no such thing as a handsome corpse."
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Conditions unit/weapon/target killed

Post by zookeeper »

Velensk wrote:In the final senario for my campin, I need a certain unit to kill a certain enemy with a certain attack. The problem is that I can't attach a filter for the weapon to a "die" event
Why wouldn't [special_filter] work?
Velensk wrote:and I don't know if I can attach a "target dies" condition to an attack ends event.
Check the hitpoints of the unit in there?
Velensk
Multiplayer Contributor
Posts: 4002
Joined: January 24th, 2007, 12:56 am

Re: Conditions unit/weapon/target killed

Post by Velensk »

In the description for the filter special tag, it listed the types of events it would work for, and die was not one of them. I have not actualy tried it, but I assumed if they did not list it, it would not work.
"There are two kinds of old men in the world. The kind who didn't go to war and who say that they should have lived fast died young and left a handsome corpse and the old men who did go to war and who say that there is no such thing as a handsome corpse."
megane
Art Contributor
Posts: 410
Joined: October 30th, 2006, 4:55 am
Location: The Big Ö (a.k.a. Austria)

Re: Conditions unit/weapon/target killed

Post by megane »

Just do an attack_end event with filter_second checking if its hp are 0 or lower.
that little girl's parents were attacked by ninjas - generic npc
hee hee! - little girl
Post Reply