HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Help with Spell

04-21-2004, 05:52 AM#1
Nemo
i cant find whats wrong with this spell..
the thing works..ecxept the damage

Quote:
Events
Unit - A unit Begins channeling an ability
Conditions
(ability being cast) Equal to Pentagram
Actions
Set Caster = (Casting unit)
Region - Center Pentagram <gen> on (position of Caster)

Unit Group - Pick every units in (Units in Pentagram <gen> and do (Actions)
Loop - Actions
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 20.00)

For each (integer A) from 1 to 90, do (Actions)
Loop - Actions
Special Effect - Create a special effect at ((Position of Caster) offset by ((200.00 x (Cos(Ang))), (200.00 x (Sing(Ang))))) using Objects\Spawnmodels\Other\IllidanSpawnFootPrint0.mdl
Set Ang = (Ang + 4.00)

Set Point[1] = ((Position of Caster) offset by ((200.00 x (Cos(57.00))), (200.00 x (Sin(57.00)))))

Set Point[2] = ((Position of Caster) offset by ((200.00 x (Cos(129.00))), (200.00 x (Sin(129.00)))))

Set Point[3] = ((Position of Caster) offset by ((200.00 x (Cos(201.00))), (200.00 x (Sin(201.00)))))

Set Point[4] = ((Position of Caster) offset by ((200.00 x (Cos(273.00))), (200.00 x (Sin(273.00)))))

Set Point[5] = ((Position of Caster) offset by ((200.00 x (Cos(345.00))), (200.00 x (Sin(345.00)))))

For each (integer A) from 1 to 25, do (Actions)
Loop - Actions
Special Effect - Create a special effect at (Point[1] offset by Dis towards (Angle from Point[1] to Point[3]) degress) using Objects\Spawnmodels\Other\IllidanSpawnFootPrint0.mdl
Set Dis = (Dis + 15.00)

Set Dis = 15.00

For each (Integer A) from 1 to 25, do (Actions)
Loop - Actions
Special Effect - Create a special effect at (Point[2] offset by Dis towards (Angle from Point[2] to Point[4]) degress) using Objects\Spawnmodels\Other\IllidanSpawnFootPrint0.mdl
Set Dis = (Dis + 15.00)

Set Dis = 15.00

For each (Integer A) from 1 to 25, do (Actions)
Loop - Actions
Special Effect - Create a special effect at (Point[3] offset by Dis towards (Angle from Point[3] to Point[5]) degress) using Objects\Spawnmodels\Other\IllidanSpawnFootPrint0.mdl
Set Dis = (Dis + 15.00)

Set Dis = 15.00

For each (Integer A) from 1 to 25, do (Actions)
Loop - Actions
Special Effect - Create a special effect at (Point[4] offset by Dis towards (Angle from Point[4] to Point[1]) degress) using Objects\Spawnmodels\Other\IllidanSpawnFootPrint0.mdl
Set Dis = (Dis + 15.00)

Set Dis = 15.00

For each (Integer A) from 1 to 25, do (Actions)
Loop - Actions
Special Effect - Create a special effect at (Point[5] offset by Dis towards (Angle from Point[5] to Point[2]) degress) using Objects\Spawnmodels\Other\IllidanSpawnFootPrint0.mdl
Set Dis = (Dis + 15.00)

Set Dis = 15.00

Unit - Order Caster to Special - Channel
Animation - Play Caster´s spell animation, using only Rare animations
Wait 1.00 seconds



please tell me why it doesent work..

Nemo
04-21-2004, 04:24 PM#2
Shark
well, i can guess what is wrong with it ...The region is not moved propertly, so since you're so advanced with triggers (not a n00b) why don't u use "pick every unit that matches <conditions> in <range> of <caster unit>" ??
also, i like your spell, can i use it in my map ? probably won't go online, most of my maps are for personal use or they never get finished :))
04-21-2004, 04:53 PM#3
Anitarf
The problem probably really lies in the region movement trigger, so it would really be best if you did it with a "unit group - units in range of caster" instead.

Otherwise, the spell is very interesting with a cool effect, but must leak a TON of point objects... If you are going to make such spells, you should learn to destroy such leaks.
04-21-2004, 07:49 PM#4
Shark
OMG, i totaly missed that he didn't destroy a single one of those bastards :)
maybe puting them (SFX) in arrays and then destroying the whole arrays after x seconds would do the trick ?
04-21-2004, 09:13 PM#5
ThyFlame
You cannot use more than one loop variable per trigger.

One for loop integer A. One for loop integer B. Use integer variables if you need more than two. I make ones called C, D, etc. So it looks similar.
04-22-2004, 06:04 AM#6
Nemo
Quote:
OMG, i totaly missed that he didn't destroy a single one of those bastards :) maybe puting them (SFX) in arrays and then destroying the whole arrays after x seconds would do the trick ?


Shark i dont realy understand what you mean.....and yes you can use it in your map..
the Variables are

Point = Point Array
Ang = Real
Dis = Real
Caster = Unit
04-23-2004, 01:42 PM#7
Shark
well, you never used the "destroy last created special effect" action, meaning that when they dissapear, they're still in the game (kinda) and can cause lag and/or memory leaks... i don't really give a damn about that either, but you create over 100 special effects and never destroy them + if you cast the spell multiple times, the chances are that it will cause memory leaks, resulting in heavy lag :)
so i suggested that you add all those special effects to an special effect variable array
with a simple action that is added at the end of the loop "set SFXArray[Integer A] to (Last created special effect)"
For defining Integer B special effects use "set SFXArray[Integer B + 25] to (last created special effect) but i'm not sure if you can do it that way...
if can't, try making 5 arrays :)
and then destroying the whole array after the spell is complete....
EDIT: just make a trigger
E:
C:
A: "for [integer a] from 1 to 125 do loop" (5 x 25 = 125, right ?)
destroy special effect SFXArray[integerA]
and that's it....
hope it helped
04-23-2004, 06:48 PM#8
Anitarf
Do not forget the leakage of point objects. There are at least two per special effect: the position of caster, and the poit to where you offset, plus later the point to where you offset the point on the circle which is originaly offset from the point of the caster. These points must be put in variables, but you only need 3 variables or something like that, because you can destroy point objects right after you make the special effect.
04-23-2004, 07:48 PM#9
Nemo
i need help with a Bank system for my AoS..

its like this.. you have a Bank and when its destroyed you dont get more gold..simply...and you only get 1 gold each time..

plz help me...

Nemo