• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Redirecting Spell

Status
Not open for further replies.
Level 2
Joined
Dec 31, 2006
Messages
16
I need help about this spell. It's effect should has some percent chance to redirect a harmfull spell back to it's caster. That's all good but I can't make it to redirect spells that deal area damage in a line.
So i want when the enemy targets me with that kind of spell to make it reach me then turn back. So far I tried making it but all I do is when the spell targets me it either passes by without turning or turns before it can reach me.
I'm not good at JASS so please reduce the Jass pr to minimum.
Don't write the whole trigger, just the turnig part.
Hope you can do it...
 
Level 11
Joined
Jul 12, 2005
Messages
764
Impossible. Once the spell is cast, it cannot be "redirected". You cast them back (but only the unit-targetted ones) by dummy spellcasters.

Event -
-Unit starts the effect of an ability
Cond -
-Level of (let's call it) Magic Mirror for (Target unit ability being cast) is greater than 0
Actions -
-Create a dummy unit, blah blah
-Add (Ability being cast) to Last created unit
-Order Last created unit to (Current order of Triggering Unit) Triggering Unit
//or kinda like this

Hope i helps! ;)
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
You add the Amulet of Spell Resistence ability or that one of evading a spell once, and change it to 100%, so the spell would still hit you, but would deal no damage or do effects. Then create a dummy unit to cast back the spell. Not sure though, I'm not good for these kind of things.
 
Level 8
Joined
Sep 13, 2006
Messages
431
You add the Amulet of Spell Resistence ability or that one of evading a spell once, and change it to 100%, so the spell would still hit you, but would deal no damage or do effects.

I think what he wanted is for the special effect and the damage to bounce back, which is not possible in my opinion. Your method would be a pretty good compromise though, I suppose.
 
Level 2
Joined
Dec 31, 2006
Messages
16
Thx, Rui, your idea really works but has it's flaws. However after few hours of WorldEdit bugging I managed to make it work. Now when someone targets me with a targeted spell [Curse for example] it rolls percent then if it's matching I deflect the spell. Also I found a way to emulate the effects and the damage but I have a buff problem - it doesn't remove the buffs nor it places them on the attacking caster.
Anyway, thank you guys =)
 
Status
Not open for further replies.
Top