HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Bounty from Trigger base Spell kills

08-18-2003, 12:57 PM#1
Ur-Shak
Can any one help me with this problem?

I created a trigger base AOE effect spell to reduce the HP of eneny units. It last 30 seconds and reduced x HP of each enemy unit each second.

What I need to know is our to award the bounty to owner of the Caster when a enemy unit dies during the spell?

Because the trigger is killing the enemy unit, no bounty is given to the caster.


tks
08-18-2003, 02:14 PM#2
GuidingSpirit
First do an Event that is run if the AoE-Spell is activated.

During this event get the target (center) of the Spell.
Next activate (Trigger-Turn On) a second Trigger.

This second Trigger runs if a unit dies:

Event - Unit dies
Condition - Dying Unit is in Range (size of the AoE) of Spelltarget
Action - Give Gold to Player

If the Trigger should stop after the AoE-Duration you could run timer. If the timer reaches 0 then a third trigger is run which turns Trigger#2 off.

A problem would be if two of those AoEs are working at the same time.

I do not have the editor by hand so I cannot try it.
08-18-2003, 02:35 PM#3
MarSara
Instead of reducing the HP by triggers, why not create a custom spell based off of Rejunivation, then create a custom spell based off of channel, and whenever the player casts the channel spell create an invisible "caster" that casts Rejunivation on all units in the AOE. Just make sure you change the heal amount in Rejunivation to a negative value.
08-18-2003, 03:10 PM#4
Sage the Mage
I did basicallly something like in the trigger depository or whatever it is. Trigger spell killer is basically a unit with a 0 aoe 99999 damage unstable concoction.

Code:
Unit Group - Pick every unit in (Units within 200.00 of target_point matching (Matching unit belongs to an enemy of (Owner of caster) Equal to True)do (Actions)
    Loop - Actions
        Unit - Wake up (Picked unit)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Life of (Picked unit)) Greater than damage)
            Then - Actions
                Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - (damage)
            Else - Actions
                Unit - Create 1 Trigger Spell Killer for (Owner of caster) at (Position of (Picked unit)) facing (Position of (Picked unit))
                Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
                Unit - Order (Last created unit) to Orc Batrider - Unstable Concoction (Picked unit)

You definately would have to modify that trigger some heh.
08-18-2003, 06:34 PM#5
Ur-Shak
So one method of getting the bounty for the kill during a trigger base spell is to create a invisable unit and then get that unit to cast a invisable damage spell on the enemy unit just before before it dies.

Tks for the info every one. I will get back to creating some spells.