| 03-02-2007, 03:12 AM | #1 |
Alrighty, so I have a chain spell I'm developing, but I've had some issues with the missile effect. With normal chain spells there's only like, 12 included models for the lightning which connects the caster of the spell and the target, the target and the next affected unit, etc. I need the flying missile to be a glaive I've gotten a workaround, but havn't implemented it because its really quite a hassle: Actual ability (we'll call it GLAIVE) Dummy ability (we'll call it DUMMY GLAIVE - based on searing arrows w/ appropriate glaive animation thingy) Dummy Caster GLAIVE is cast Dummy Caster created at position of caster Dummy Caster uses Dummy Glaive at target Next target is chosen based on closeness Repeated I have the sneaking suspicion that recreating the dummy units over and over again is simply going to be inefficient and cause other issues. Is there any other workaround for this? |
| 03-02-2007, 03:20 AM | #2 |
Use the caster system? Or look at wc3jass.com (which happens to be down at-the-moment) for a chain spell function. |
| 03-02-2007, 03:25 AM | #3 |
I don't think it has try search the GUI tuts Daelin made one somewhere -Av3n |
| 03-02-2007, 03:28 AM | #4 |
If I include the caster system, where would I go with it from there? |
| 03-02-2007, 03:36 AM | #5 |
Any direction, really. Look through the configuration sections for the chain spell until you find missile art. Then, look for where the variable that that art is stored to is used in the function below it. That should give you some ideas without forcing you to use the whole caster system. |
| 03-02-2007, 04:15 AM | #6 |
Vex's spell templates or Pyro idea -Av3n |
| 03-02-2007, 04:32 AM | #7 |
If I use only the function relative to the chain-spell template, would I be able to effectively use only that part of the CS system? It would be wonderful to not have to import the entire thing for this one little spell-shell. EDIT: Also! I'm working on another ability for another unit but have hit a snag..but I don't think its necessary to post another topic. I have a unit that has a % chance to "attack again" (double-shot). The 2nd attack would hit a random target within the target's attack radius and it would have to take into account any items or bonuses the hero in question has (so no dummy units, unless they're well crafted) |
| 03-02-2007, 05:21 AM | #8 |
Maybe gte the unit to play the attack animation and somehow calculate to dmaage done before and deal it with the animation forced on an percent, add an sfx as wel so you know you are double attacking -Av3n |
| 03-02-2007, 05:21 AM | #9 |
You'll have to use an attack detect engine, which there are a few of in the resources section. Then, store the damage done when an attack is detected to a variable; if the % chance fires (however you do it), then have the attacking unit damage a random unit (yadda, yadda, yadda) through triggers, make him face the unit, play his attack animation, and any SFX you may desire. As for the chain spell thing, here's what the Caster System does: JASS:call SetUnitPosition(m, GetUnitX(u), GetUnitY(u) ) call SetUnitFlyHeight(m, GetAbilityDataReal(s,l,"height"), 0 ) set fx= AddSpellEffectTargetById(s,EFFECT_TYPE_AREA_EFFECT,m,"origin") set x=GetAbilityDataReal(s,l,"scale") call SetUnitScale(m,x,x,x) call SetUnitOwner(m, GetOwningPlayer(u), true) |
