| 02-17-2004, 09:43 PM | #1 |
I was making a spell that had a pretty cool effect I think. I was making it for the weekly spell map that I am running now so you guys will see it in action soon. What it does is it creates frost novas in a line like shockwave. Creating the special effects was way easy, just some stuff with loops. But then I had to create dummy units with a modified frost nova spell (no model) to give the buff to those who were in the line. Picking the units and adding them to a group was quite easy too, but now I am facing a very weird problem. I create 1 of these dummy units for every nova animation and then order them to frost nova a random guy from the unit group. Now here comes the strange part. The units were invisible but when I started having problems I gave them a model to figure out what was going wrong. The problem was, that after 1 unit cast frost nova, it quit creating units. I cannot figure out why. If no one uses frost nova, then it creates all the dummy units, but if the first unit created casts the spell then no more are made. It is especially weird because the nova effects are made in the same loop, but they never stop creating themselves. The units definitely have enough health to withstand a nova blow, so it isn't that. I don't know. I am posting the loop in the trigger, so if you can look at it and tell me if you see any problems. Code:
set x[2] = 1
set y[2] = 8
loop
exitwhen x[2] > y[2]
call AddSpecialEffectLocBJ( udg_IceWaveOffsets[x[2]], "Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl" )
set udg_IceWaveSpecialEffects[x[2]] = GetLastCreatedEffectBJ()
call CreateNUnitsAtLoc( 1, 'e000', GetOwningPlayer(GetSpellAbilityUnit()), udg_IceWaveOffsets[x[2]], bj_UNIT_FACING )
set udg_IceWaveUnitArray[x[2]] = GetLastCreatedUnit()
call UnitAddAbilityBJ('Aloc', udg_IceWaveUnitArray[x[2]])
call IssueTargetOrderBJ( udg_IceWaveUnitArray[x[2]], "frostnova", GroupPickRandomUnit(udg_UnitGroup[1]) )
call TriggerSleepAction( 0.00 )
set x[2] = x[2] + 1
endloop |
| 02-17-2004, 09:52 PM | #2 |
maybe the problem is in the JASS |
| 02-17-2004, 09:54 PM | #3 |
If you have no idea what you are talking about, please don't post. |
| 02-17-2004, 10:48 PM | #4 |
It may help you to know that theres no need to use multiple casters for Frost Nova as it can be cast instantly, as long as you use a hidden caster like the flying sheep and move it to the location of each target before casting. |
| 02-18-2004, 02:04 PM | #5 |
Grater is right, I made a spell like yours, although I used points instead of units, and I only needed a caster (with Aloc that was added and removed) moved the caster every 0 seconds and ordered it to cast frost nova on himself worked incredibly well, I also made the frost novas to appear at somehow random spots (but still with polar projection) |
