Skip to content

On Hit Effects

AmeranthftwAmeranthftw Member Posts: 57
edited October 2014 in General Modding
Consider the case of a spell like power attack; you use it, you get a buff, for the duration whenever you hit things, there is a chance they get stunned.

Is it possible to have an on hit effect for a skill like power attack where something happens to the caster? So for example, I use my power attack, whenever I hit someone, an effect occurs targeting me. I've tried messing with the target parameter, but it seems like whichever I chose, the effect still happens to the creature I hit.

EDIT: What I'm trying to get at is to have a character cast a spell on a target that he hits.
Post edited by Ameranthftw on

Comments

  • AmeranthftwAmeranthftw Member Posts: 57
    Now that I think about it more, I don't think I've ever seen an effect, on item or spell, that has the attacker cast a spell on hit. Is this even possible? Moreover, would it be possible with scripting?
  • elminsterelminster Member, Developer Posts: 16,317
    edited October 2014

    Now that I think about it more, I don't think I've ever seen an effect, on item or spell, that has the attacker cast a spell on hit. Is this even possible? Moreover, would it be possible with scripting?

    If you are looking at an item then you could have the item with a "cast spell on condition" effect (232) on it that has whatever the spell you select cast itself when "target hit" (0). If you check out Rancor+1 in Near Infinity it might give you some idea to what I mean.
  • AmeranthftwAmeranthftw Member Posts: 57
    edited October 2014
    I'll take a look, the end product I was hoping for though would be an ability.

    EDIT: Hm, yes the cast spell on condition effect is probably the closest I've been to the desired effect, but I cannot seem to configure the conditions on it to get the effect to proc when the user hits an enemy. Even using the "target hit" condition causes the proc when the user is hit by an enemy; the reverse of what I want.
  • kjeronkjeron Member Posts: 2,368
    This:


    Is it possible to have an on hit effect for a skill like power attack where something happens to the caster? So for example, I use my power attack, whenever I hit someone, an effect occurs targeting me. I've tried messing with the target parameter, but it seems like whichever I chose, the effect still happens to the creature I hit.

    contrdicts this:


    EDIT: What I'm trying to get at is to have a character cast a spell on a target that he hits.

    So which do you want? To target yourself when you hit the enemy, or target the enemy when you hit the enemy?

    Opcode 248: Melee Hit effect, Resource must be an .eff file.
    .eff file: Opcode: 146 Cast Spell, Instant cast, Resource must be a .spl file.
    -either-
    .spl file: Opcode(s): whatever you're wanting to do to yourself, target:self.
    -or-
    .spl file: Opcode(s): whatever you're wanting to do to the enemy, target:preset.
  • AmeranthftwAmeranthftw Member Posts: 57
    What I'm saying is I want the character using the skill (the attacker) to cast a spell targeting the attacked. Something like vampiric touch, which effects the caster, but ultimately targets the attacked.
  • AmeranthftwAmeranthftw Member Posts: 57
    Wow, so I've tried what you wrote above before, Kjeron, but now, after you directed me to, I try it again and it works. Well thank you very much for your help, I achieved the desired effect by using Opcode 248, linking to opcode 146 targeting self with a .spl file.
Sign In or Register to comment.