HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

WEU Advaced Trig: Damage Source

03-25-2005, 07:08 AM#1
Valmanway
Heres what I have:

Valmanway
Events
Advanced - Any unit takes damage
Conditions
(Item-type of (Item carried by (Damage source) in slot 1)) Equal to Valmanway
Actions
Advanced - Create at Attach Point - Origin of (Triggering unit) the Abilities\Spells\Other\Charm\CharmTarget.mdl effect lasting 5.00 seconds
Wait 0.25 seconds
Sound - Play MetalMediumSliceFlesh1 <gen> at 100.00% volume, attached to (Triggering unit)
Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) - (Damage taken))
Wait 0.25 seconds
Sound - Play MetalMediumSliceFlesh3 <gen> at 100.00% volume, attached to (Triggering unit)
Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) - (Damage taken))

What I want it to do is when the unit hits another with the weapon in slot 1, it shows the special effect and damages it 2 more times with the slashing sound. I've tried multiple things and found that the problem is that the "Damage Source" event response doesn't work. Any idea?
03-25-2005, 07:12 AM#2
Azhag
Switch it to attacking unit...
03-25-2005, 07:15 AM#3
Valmanway
Quote:
Originally Posted by Azhag
Switch it to attacking unit...

Doesn't work. The event response has to correspond to the source of the "Damage Taken".
03-25-2005, 07:24 AM#4
Azhag
This is the condition I came up with.

Code:
((Item carried by (Attacking unit) of type Valmanway) is owned) Equal to True
03-25-2005, 07:25 AM#5
Valmanway
Quote:
Originally Posted by Azhag
This is the condition I came up with.

Code:
((Item carried by (Attacked unit) of type Valmanway) is owned) Equal to True

I got that working, now im stuck. How can i determine the amount of damage the unit just did or will do?
03-25-2005, 07:33 AM#6
Azhag
Oh, man that a difficult one. I don't think its possible. Maybe there is a variable or something for it. I'll keep looking though.
03-25-2005, 07:37 AM#7
Valmanway
The advanced trigger is broken. If only it worked. I'll have to find another way then i guess...
03-25-2005, 07:38 AM#8
Azhag
Sorry, I did the best I could.
03-25-2005, 11:38 AM#9
johnfn
Its an event response under reals, damage taken.
03-25-2005, 12:02 PM#10
CyborgDragon
Here's my code fr it, it using regular triggers:

Code:
 Valmanway
Events
Unit - Unit is attacked
Conditions
((Attacking Unit) has an item of type Valmanway) Equal to True
Actions
Special Effect - Create a special effect attached to the origin of (Attacked Unit) using Abilities\Spells\Other\Charm\CharmTarget.mdl
Sound - Play MetalMediumSliceFlesh1 <gen> at 100.00% volume, attached to (Triggering unit)
Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) - (Damage taken))
Wait 0.25 seconds
Sound - Play MetalMediumSliceFlesh3 <gen> at 100.00% volume, attached to (Triggering unit)
Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) - (Damage taken))
Wait - 4.50 seconds
Special Effect 
03-25-2005, 12:05 PM#11
johnfn
Kindly tell me exactly what that is because it looks like to me that its a triple damage trigger which doesnt really make any sense to me because thats not really what we were talking about at all.
03-25-2005, 12:47 PM#12
Anitarf
The "Damage taken" function is an event response that works only with the "specific unit event - a unit takes damage". It definitely won't work with "unit is attacked" event, as CyborgDragon proposed, and maybe that's also the reason it didn't work before, because you used an advanced WEU event. The "damage source" response apparently works with this event, but that's only because it's an older event, I think, the "damage taken" was added more recently and maybe the WEU's event doesn't work with it... at least, I find no other reason why the above trigger wouldn't work, except if perhaps the damage event responses have the same problem as cast event responses...

If you, instead, were to add with some other trigger a specific unit event to this trigger for each unit that entered playable map area, then maybe it would work, because the "damage taken" event response will then surely work.

And instead of substracting life, why don't you use the new 1.17 functions to deal damage directly to the target, thus granting experience and bounty if the triggered damage would kill the unit.
03-25-2005, 05:50 PM#13
Azhag
He's asking for a condition that checks the amount of damage done or about to do, not what item was carried by the unit getting attacked. He said that he already figured out the condition for if the unit is carrying the item.
03-25-2005, 08:06 PM#14
Valmanway
The "damage taken" doesn't work for some reason. Although I'm using world editor unlimited, so ill try it in regular WE.

What I'm trying to do is make a triple attack when the player has the "Valmanway" sword equipped. Its for my map, "Castlevania: Legacy of Heroes". DOTA has a double attack so i wonder if i can pawn that and make a triple attack.
03-25-2005, 08:19 PM#15
CyborgDragon
Quote:
Originally Posted by Azhag
He's asking for a condition that checks the amount of damage done or about to do, not what item was carried by the unit getting attacked. He said that he already figured out the condition for if the unit is carrying the item.

Okay, first of all my condition says Attacking unit, second of all read the whole thing, it does triple damage not an item checking trigger.