HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Detecting Spell's End

11-15-2006, 01:05 AM#1
Relyte
Is there any way to detect when a spell finishes, e.g, Shadow strike, then add another event, such as more damage?
I might add that I'm purely working in GUI, I haven't taken the time to learn JASS yet.
11-15-2006, 01:48 AM#2
Matarael
You could "wait until (target unit) has specific buff (shadow strike) = false" or just see how many seconds the poison lasts and wait that long I think.
11-15-2006, 02:56 AM#3
Av3n
Well this is the event though i don't know which condition to use though...

Trigger:
Random Trigger
Collapse Events
Unit - A unit Finishes casting an ability
Conditions
Actions
11-16-2006, 08:36 PM#4
wyrmlord
Trigger:
SomeTrigger
Collapse Events
Unit - A unit Finishes casting an ability
Collapse Conditions
(Ability being cast) Equal to Shadow Strike
Collapse Actions
Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing 50.00 damage of attack type Spells and damage type Normal

This is probably something along the lines of what you are looking for.
11-16-2006, 08:55 PM#5
Daxtreme
Finishes casting usually only works with channeling spells and test if the unit successfully FINISHED casting the spell, i.e not got interrupted, stunned or in any way prevented from channeling the rest of the spell.

For a single ability which isn't channeling you can just wait the duration of the shadow strike, then add more damage.
11-16-2006, 09:32 PM#6
Anitarf
There is no event that would occur when a unit looses a buff. The best you can do is wait just slightly less than the buff duration, and if the unit still has the buff then then the buff lasted for the full duration (unless it was re-cast in the meantime - so, no, this isn't a particularly easy solution either).

When I have to do these kind of effects for my map, I'm going to trigger all the buffs.
11-17-2006, 12:41 AM#7
Relyte
This is tough... I've been trying to make a spell called Immolate. It's basically lightning shield except the target takes damage too. I can't edit the spell in the object editor, so I have to Shadow strike him with triggers. I want the target to take damage, then when the damage is done, take another 100-200 damage. Another problem is how do I hide the buff for the Shadow strike?
11-20-2006, 07:06 AM#8
Pyrogasm
As for the dummy buff, I would suggest that you remove the immolation buff from your immolation spell, and then add that immolation buff to your dummy shadow strike spell instead of the shadow strike buff...but I'm baffled as to how to remove those darn floating damage numbers. Maybe if you based it off of drain life instead of shadow strike and give it no animation/art at all, with an infinite distance, because I'm assuming you want your hero to be able to move while he's using Immolation. However, if your Immolation spell will be able to be cancelled, then you'll have to use triggers to order your dummy unit to stop channeling drain life.
11-22-2006, 07:25 AM#9
Pyrogasm
This thread is probably of no interest to Relyte anymore but, alternatively, you could make a dummy rejuvination spell that heals for negative damage.
11-22-2006, 08:55 AM#10
Fireeye
1. Problem)
Uhm, my idea (well, not a good solution i know) is adding the target unit of a specific Spell to a unit group and when it doesn't have the buff anymore (periodic timer) you run the second action and remove the unit from the unit group.
You could also create a timer, store the unit into the game cache and check every period, when the buff isn't existing anymore run your action, stop the timer and clean up.
2. Problem)
don't use shadow strike and make a dummy ability and then order the target unit to damage an area.
11-22-2006, 02:40 PM#11
BertTheJasser
In fact there are 2 events: EVENT_PLAYER_UNIT_SPELL_ENDCAST and EVENT_PLAYER_UNIT_SPELL_FINISH
11-23-2006, 04:10 AM#12
Av3n
*sigh* Thats the advantage of JASS!

-Av3n
11-23-2006, 06:58 AM#13
blu_da_noob
Quote:
Originally Posted by BertTheJasser
In fact there are 2 events: EVENT_PLAYER_UNIT_SPELL_ENDCAST and EVENT_PLAYER_UNIT_SPELL_FINISH

If you read the thread, you would see that's not what the guy is looking for.
11-23-2006, 06:25 PM#14
BertTheJasser
Mmmh... sorry, missunderstood.
12-05-2006, 12:23 AM#15
Relyte
Thanks for all your help! Yeah, Blu's right, I'm not really looking for Jass. The negative regen suggested by Pyrogasm wouldn't have that last damage, it would just do damage over time. I don't really care about floating text for the Shadow strike, that's fine. I tried taking away the Immolate buff, but most spells that make buffs NEED them and will create their own if you don't make new ones or keep them like they were. Oh, and I tried making the buff an invisible one, i.e., Freeeze, headhunter spirit, etc.. but it showed a green box. I also tried, for the last damage to wait the length then damage the unit, but that didn't work. Bert, I tried a little test (the finishes casting and stops casting an ability, then converting to custom text) and I found out that they aren't what I want... :\ Oh! Almost forgot! I gave up on hiding the Shadow strike buff, I just made it the same as the immolate buff. :) Now how do I do the last 100-200 damage?