• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] [ASK] add EXP every kill

Status
Not open for further replies.

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Huurka , basically the on attack even can be abused as if you press stop or s repetitivly, it will fire a lot faster than the unit attacks. Thus with this kind of trigger, it will bug heavilly and result in you gainng far more EXP than you should so it would be abusable.

The only real way to do this is via a JASS attack damage detection which will fire only when the unit is damaged from an attack and not when it starts attacking.
 

TKF

TKF

Level 19
Joined
Nov 29, 2006
Messages
1,266
Well, if the attack unit has 0.000 and 0.000 in both Animation Backswing Point and Animation Damage Point, it works well.

Another solution is to use custom unit value detection on attacked unit to verify real attacks, however you will not gain xp on first attack this way, but for the rest of the attacks.
 

TKF

TKF

Level 19
Joined
Nov 29, 2006
Messages
1,266
...The only real way to do this is via a JASS attack damage detection which will fire only when the unit is damaged from an attack and not when it starts attacking.

This do work well, but I haven't tried it myself. Thus more complicated system than I suggested. Also doesn't damage detection lagg when a lot of units attack each other?

Good Job TKF!

How is your map going? When Will it come out?

Well, it's quite finished
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
This do work well, but I haven't tried it myself. Thus more complicated system than I suggested. Also doesn't damage detection lagg when a lot of units attack each other?

Yes it may lag depending on attack count. But it is better than On attack event.
Here is an different attack detection engine ;)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,198
Also your fix of removing the animation swing also can make some attack animations not athetically pleasing (not look so good). This is due to some models are made to damage at certian points of an animation so it can really look bad when a projectile is launched while a unit is holding it (archer) or hit with a sword when it is still being drawn backwards (pallidan or footman).
 
Level 2
Joined
Jul 27, 2007
Messages
24
@all
sorry, but I need the trigger that accumulates EXP from damage dealt (25%) to the targeted (enemy) unit(s)... (includes spells)

@TKF
TKF says :
Well, if the attack unit has 0.000 and 0.000 in both Animation Backswing Point and Animation Damage Point, it works well.

Another solution is to use custom unit value detection on attacked unit to verify real attacks, however you will not gain xp on first attack this way, but for the rest of the attacks.

That's good, but I need the trigger in order to make this system worked normally... :|
 
Last edited:
Status
Not open for further replies.
Top