HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

On Attack Template 1.2

02-05-2007, 05:07 AM#1
emjlr3
For lack of a better name, here is my On Attack Template 1.2

Basically this is a system that allows GUI users to easily use an attack detect engine type system for attacks and abilities. It also allows JASS users, from the novice to the the expert, to detect attacks w/o using orbs, or for every unit on the map at all times, and do whatever you want to them w/o having to manually detect it each time yourself.

Quote:
Why not just use the "A Unit Is Attacked Event", and then do your stuff?

This is easily abusable, using an attack/stop series of orders, to get your ability to fire over and over w/o actually ever attacking the unit. Also, for ranged units, the previous would do your effects when the target is attacked, which is before it actually takes damage, thus it would look odd, casting a spell on the target, or creating a text tag or something, while your attackers projectile is still flying through the air at its target.

Quote:
Why use this over any other Attack Detect Engine?

I am not too sure. I like it, and I do not like using attack detect engines, since it removes orbs from your game, and it detects damage for all units on your map at all times. This only does so when you want it to, and I personally find it no harder to use this system with the On_Attack_Template_Function call then it is to add your function to a damage que used by damage detection engines. Is this way better? Maybe, maybe not, but this is how I like do it :).

Quote:
What exactly does this allow you to do?

Well, for GUI and JASS users alike, it gives you the option to detect the damage from an attack, and , using the first two functions, cast an ability on the target at a specified level, or deal extra damage to the target, using any functions you want to get a real amount.

For users with sufficient JASS knowledge enabling them to write their own functions, it allows you to do basically whatever you want to the target once they take damage from the attack. You can even check for the buff of an activatable orb effect, such as poison arrows, and only deal effects when the unit is hit by said attack.

In any case, I think it may be a neat, unique system, that could very well help people with their map creation efforts.

Included is what I consider a very thorough read me, which covers all the functions, and a sample ability for each.

Version History:
  • 1.2 - Ported to vJASS, slightly updated readme, removed demo 4 ability from test map
  • 1.1 - Added greater functionality
  • 1.0 - Initial Release

Expand system code:

Enjoy!
Attached Images
File type: jpgattack temp.JPG (178.7 KB)
Attached Files
File type: w3xOn Attack Template 1.2 - emjlr3.w3x (86.5 KB)
02-05-2007, 06:14 AM#2
Pheonix-IV
Handy. This is the first Attack Detect system i've seen that didn't require any JASS knoweledge to use and\or implement.
02-05-2007, 12:37 PM#3
Rising_Dusk
This system falters if you cast a damaging spell on the target within the window of attack.
It's neat though, it functions the same as the orb system just lacks the spell/attack differentiation the orb system has.
So... It might be useful for a select few people.
02-05-2007, 12:45 PM#4
Vexorian
Old attackdetect engine used this method instead of the orb one, I am not sure which one is better
02-05-2007, 01:39 PM#5
emjlr3
Quote:
Originally Posted by Pheonix-IV
Handy. This is the first Attack Detect system i've seen that didn't require any JASS knoweledge to use and\or implement.

that was my intent, allowing GUI users to be able to detect attacks, as well as JASS users to be able to do so as well easily

Quote:
Originally Posted by Rising_Dusk
This system falters if you cast a damaging spell on the target within the window of attack.
It's neat though, it functions the same as the orb system just lacks the spell/attack differentiation the orb system has.
So... It might be useful for a select few people.

agreed, note the name, On Attack Template, heh, I chose my words with that in mind.

I would like to do some tests with that, since there is a 2 second window there, to see if I could get a spell cast off in that frame time, which does damage, however I think it may be more of a problem if you are actually trying to do that, o well

**I could however, create another local trigger with the event EVENT_UNIT_SPELL_CAST, since if the unit is casting a spell, even not the effect, its clearly not attacking, and disable the damage trigger through that, but then that may screw up ranged attackers..so...

Quote:
Originally Posted by Vexorian
Old attackdetect engine used this method instead of the orb one, I am not sure which one is better

I figured as much. The new method would probably be better if you have a need to detect all damage done to every unit on your map at all times, and be able to discern between it being spell or attack. However, for what I believe most maps to have, is a need for a few abilities, or there abouts, to be able to detect those attacks, and this enables both JASS and GUI users to do so.
02-05-2007, 02:10 PM#6
Vexorian
I was talking about not using orbs.
02-05-2007, 02:36 PM#7
blu_da_noob
Quote:
This system falters if you cast a damaging spell on the target within the window of attack.

Just a note, this also applies to all manner of DoT spells etc. I don't, however, have time to actually check anything tonight >.< (essays ftl).
02-06-2007, 02:57 PM#8
blu_da_noob
Well I just played around with this. Something in the test map itself does show the flaw with this (for example, a throat-cut-thing'd tauren chieftan was running towards by hero, I started an attack and then he was damaged by the DoT. The mass-damage-based-on-life-lost thing triggered and instantly killed him, without my attack even firing).

[edit - ignore this, I forget that you need a new event each time you attack]
02-06-2007, 09:28 PM#9
emjlr3
Quote:
Originally Posted by blu_da_noob
Well I just played around with this. Something in the test map itself does show the flaw with this (for example, a throat-cut-thing'd tauren chieftan was running towards by hero, I started an attack and then he was damaged by the DoT. The mass-damage-based-on-life-lost thing triggered and instantly killed him, without my attack even firing).

[edit - ignore this, I forget that you need a new event each time you attack]

yea it makes sense what you are saying, that is my fault

I could easily have made a dummy unit that did the damage, and removed him later, to remove the chance of that happening, but I do get what you are saying
02-10-2007, 05:23 PM#10
emjlr3
ok well just a bump, it has been a few days here :)
02-11-2007, 05:58 PM#11
blu_da_noob
This still has a major bug, in that stop spamming will create many detection triggers and a subsequent attack will fire all of these at once. We can't have a system with a major flaw in its basic operation.
02-11-2007, 06:52 PM#12
moyack
Quote:
Originally Posted by blu_da_noob
Just a note, this also applies to all manner of DoT spells etc. I don't, however, have time to actually check anything tonight >.< (essays ftl).
Quote:
Originally Posted by blu_da_noob
Well I just played around with this. Something in the test map itself does show the flaw with this (for example, a throat-cut-thing'd tauren chieftan was running towards by hero, I started an attack and then he was damaged by the DoT. The mass-damage-based-on-life-lost thing triggered and instantly killed him, without my attack even firing).

[edit - ignore this, I forget that you need a new event each time you attack]
I understood that you changed your mind about the mentioned bug, so I considered that there was no problems with the system. My apologizes.

Post deleted.
02-11-2007, 07:32 PM#13
emjlr3
o well, better luck next time, I created this as a more GUI type deal anyway, so they can have a system as well, and there are not man GUIers here anyhow

to the graveyard she goes
02-11-2007, 09:42 PM#14
Vexorian
Really? You just give up? How hard might it be to fix the bug? Is "GUI type deal" really an excuse to have this bug?
02-12-2007, 12:45 AM#15
emjlr3
is it an excuse... well this the only other method I can think of to make an attack detect engine work(other then orbs, and I was trying to stay away from those, which was also another purpose), and with GUI at that, where the current orb method will not work, unless I made this compatible with the current orb effect ones, and thus making it not stand alone, and using orbs

with that said, i cannot think of a way to work around that bug using this method I am, maybe I am not thinking outside the box, or maybe i am just missing something obvious, or maybe there is none, whatever the case may be, i am not sure what you want me to do