SC2Mapster Forums

Development > Triggers

How can I change this ability to add scaling?

  • 7 posts
    #1 Feb 04, 2013 at 15:42 UTC - 0 likes

    The scaling method I normally use is a trigger like this: Environment - Deal damage using Dummy Damage on (Triggering unit) from (Damaging unit) with ((Stack count of Intelligence on (Damaging unit)) * 0.5) extra damage

    Now, the type of ability is an effect target type, which uses the launch missile effect. From what I understand, this is the best way to make a missile hit the first target it comes in contact with (referring to the process at the bottom of the page.)

    However, using a trigger like this won't work because the "Damaging unit" is the ammo unit of the launch missile ability, which not only dies upon impact but won't have the intelligence attribute for scaling. I don't think this is a trigger problem, though I may be wrong. Is there any other way to generate a similar ability, which would make the "Damaging unit" in the trigger, the caster instead?

    #2 Feb 04, 2013 at 23:06 UTC - 0 likes

    @AdamantiumHydra: Go

    Hey Fapamantium. ;D

    I assume the unit using this ability is going to be a special unit, like a hero? One per player? If so, just save it in an array of units with the index value being the player's number.

    That way, you could say Deal damage using Dummy Damage on (Triggering unit) from Hero[(Owner of (Damaging Unit))] with ((Stack count of Intelligence on Hero[(Owner of (Damaging Unit))]) * 0.5) extra damage

    Hope this helped.

    Last edited Feb 05, 2013 by MasterWrath

    Trigger, layout, interface specialist for Aeon of Storms.

    #3 Feb 05, 2013 at 13:12 UTC - 0 likes

    @AdamantiumHydra: Go

    Alternatively, set a custom value on the ammo unit equal to the caster's intelligence and use that for the scale. You could apply this on a "Unit Uses Ability" event.

    My Projects:
    Malum Ruina: SC2Mapster
    Eternal Exile: SC2Mapster
    Spine Crawler Madness: SC2Mapster
    Xeno Crisis: SC2Mapster

    #4 Feb 05, 2013 at 15:07 UTC - 0 likes

    Sorry, but I'm still lost.

    @BasharTeg

    I don't think that method would work because the unit is dead before the damage is applied, so the trigger would have nothing to reference.

    @ Wrath thanks hon :) I used a separate trigger to set the array to the caster, then used that array as the damaging unit. However, If two people use this, then the damage scaling will default to whoever cast it last.

    Last edited Feb 05, 2013 by AdamantiumHydra
    #5 Feb 05, 2013 at 19:09 UTC - 0 likes
    Quote from AdamantiumHydra: Go

    Sorry, but I'm still lost.

    @BasharTeg

    I don't think that method would work because the unit is dead before the damage is applied, so the trigger would have nothing to reference.

    Well that depends on how the damage is applied. Since you are using triggers to apply a variable damage amount, you could destroy the unit after the damage is applied.

    #6 Feb 05, 2013 at 22:42 UTC - 0 likes

    @AdamantiumHydra: Go

    Don't use the array to save the last unit to cast the ability - use an array to save each player's hero, at the beginning of the game. So Player 1's hero would be stored permanently in Hero[1]. Then, when somebody takes damage from the ability, you just need to use the damage action as I wrote it above.

    #7 Feb 09, 2013 at 11:01 UTC - 0 likes

    Not at my editor but can't you set the source of the damage on the damaging effect to be the caster unit that launched the series of effects?

  • 7 posts

You must login to post a comment. Don't have an account? Register to get one!