HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Canceling channeling spell, JASS

06-04-2004, 11:57 PM#1
Lej
Hey, I started fooling around with the world editor a few days ago and when I today found out about JASS I felt I had to try it. So I decided to make a channeling spell that when completed raises skeletons from all corpses close to the caster. While It's channeling it draws a pentagram of fire on the ground.

I got two problems. How can I make it so if the hero moves the spell is aborted and all effects removed and the trigger canceled. Right now I just made an if that checks if the hero is in the same location as when he started channeling when I'm about to create the skeletons.

Second problem is that if the hero is killed the skeletons still are created.

I'll attach the map here. I would love if anyone could give me some help but I guess it maybe aint that fun :\
06-05-2004, 05:56 AM#2
JJ912
Ive been working on a spell just like that today :o What I did was(it doesnt have to be in JASS either) set it so when the hero starts to cast the ability, a timer is started. Whenever the timer is expired, in another trigger that has multiple If/Then/Elses, it checks an integer variable and depending on what it is it creates special effects in the right places, adds to the integer, and restarts the timer.

Also in the trigger that detects when the spell is started to be channeled, another trigger is turned on that has the Event Unit Stops Casting Ability. This will detect when the unit stops channeling. If the trigger fires, then all the variables are reset and cleared and the trigger turns itself off. Then the next time the timer expires it sees the integer at 0 and shuts itself off as well.

Once the Integer makes its way to the number I wanted it then does the summoning, clears the variables, turns off the other trigger, and starts up another that will remove the dummy casters.

Thats the basic layout of the triggers. I cant open the World Editor right now so youll have to build from the description if you wanna do it that way. In terms of size efficiency I guess its not too good, but hey it works and doesnt lag. :D
06-05-2004, 11:42 AM#3
xGT4x
Lej that's stupid, if you can make spells with same quality with Triggers you should do that first. Additionally you should learn the GUI functions/conditions/events first...
06-05-2004, 01:44 PM#4
Lej
I guess you might got a point there XIID. I should probably be more used to all the functions/conditions/event :( Thing was I had like hundreds of global variables so JASS was very tempting. Also I looked very much like visual basic witch I used some before. Well, well I don't feel like changing this into triggers now, JJ you gave me an idea on how to fix it. ^_^

Edited because:

Spell fixed and uploaded here: http://www.wc3sear.ch/?p=Spells&ID=133
Feedback welcome! :)

.