HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

attacking detection

08-29-2005, 02:00 AM#1
Linera
How can I detect how long a unit isn't being attack by spells?
08-29-2005, 05:46 AM#2
Zandose
Uh...I'm not sure ecactly what you mean but I'll try anyways. Make a trigger to detect when a ability/spell is finished being casted on your units then start a timer. Now make another trigger for when the unit gets attacked and just check the time between the two with the timer.
08-29-2005, 02:12 PM#3
Vexorian
YOu can't, cause it is almost impossible to know if damage was caused by a spell or by attack
08-29-2005, 02:45 PM#4
Linera
i don't care if the spell caused damage or not.
08-29-2005, 06:45 PM#5
Tim.
So you want to know the time between two spells are cast?
08-29-2005, 10:17 PM#6
drdlord
well it's VERY ineffecent and inacurate but you could have a trigger running once a game second and have it increment an integer and have another trigger when the spell is cast, check the integer and reset it to 0.

NOTE: the acuracy of this integer will be HORRID it might be better to run every 5 seconds depending on how long you expect to be between casts.
08-29-2005, 10:23 PM#7
drdlord
also you'd need an integer for every unit you want to check...