- Joined
- Jun 25, 2008
- Messages
- 2,307
I need it to do an ON HIT detection system, so i can start doing some stuff and trigger the whole game.
It is not possible to detect the exact moment, either you do stuff after or before the damage is applied.
That makes it a bit easier.
Use a damage detection system and for your condition just check if damage dealt is equal to 0. Then just make sure none of your spells deal 0 damage.
That won't work, many spells deal zero damage and you can't prevent them from doing so.
You will have to use a DDS with type support.
Well, for another subject, i needed to detect the armor to do an armor penetration system, but it seems i dont need to detect the armor to do so. The only problem is, actually, that i need to solve an issue with the armor penetration system im doing, ive been doing it from the physical detection system that was posted before.
Problem: The system works perfectly in this case: the unit has 10 armor, ok the armor penetration value is equal to 10, this means damage is dealt, is saved, is increased by 10% and then armor is reduced and damage is dealt again. If the unit with 10 armor only received 90 damage from 100 it recieves 100 damage. But if the unit has more than 10 armor it deals less than if the armor penetration was implemented. I need to find a correct formula modifier. How do i make so?
See this map anyways:
http://www.hiveworkshop.com/forums/pastebin.php?id=a2c8v9
I have the armor calculation in here.
Ive changed the amount of %armor damage reduction to 1, check the map so u can see what i mean.
Check the part where the sorceress is.
1 footman will deal full damage to the Mortar Team (it has the armor pen) and the other will deal less damage. When attacking the sorceress the one that has the armor pen should deal the same damage that the nonpen footman is doing when attacking the mortar team (cause if the sorceress has 20 armor -10 armor pen she should have the same amount that the mortar has)
What do you mean by pen?
Armor Penetration, this means that the damage ignores an amount of the targets armor. By example, one footman has 10 armor pen and 100 damage, the target has 10 armor, he deals 100 damage, the other footman has no armor penetration and 100 damage, the target has 10 armor, he deals 93 damage. The problem is when i attack targets with more than 10 armor...
This has to be triggered.
If you just want armor to reduce damage taken by 1 per armor and armor piercing to make it ignore armor, then...
You get the armor of unit(there's a function).
You reduce the amount of armor by armor piercing.
If result is less than 0, then set it to 0.
Reduce damage by armor.
If damage is below minimum allowed, then raise it to minimum.
EDIT: But I just realized you want it to have diminishing returns. I'll need some time.
Exactly, there is a small problem, cause the damage is refracted twice in armor. I need help t.t, it is for my pvp mmorpg