crystal.maiden_19
Member
- Reaction score
- 9
Great...! then the MPI was I needed not MUI...
That's an awesome ideas, but that means I have to counting how many steps that drag do to the target and calculate how much damage per drag step, so the target would get damage exactly like being planned, right...? I'm sorry if I was wrong...
You already have the drag distance and the total damage scale by the exact same ratios, so once you do the calculation once it should be easy to scale to other levels.
If I am not mistaken the speed at which the unit is dragged is constant, the drag just lasts longer at higher levels. Therefore the damage per interval can be the same regardless of ability level... because higher levels last longer leading to the unit getting hit more times.
Are you kidding me...?Dont use the custom value as index into the array. That is overly complicated.
Use the player number instead. Its simple and perfectly MPI because each player has its own number.
Player Numbers as arrays can guaranteed that this spell won't bug if it being cast by multiple player...?1) Custom value is a value which you can set. You can change it at any point in time.
This is a potential for errors and mistakes.
In your current configuration (besides the fact, that it wont work) you use the custom value of the caster. But it might be (due to a badly written trigger) that 2 units have the same custom value. In this case the spell would be broken and bugs would appear.
The player number of the owning trigger however is pre-set and fixed. It can not be changed in any way. This assures that each caster has a unique index in the array.
Yes, I want to damage the target while it was being dragged, but the damage was from triggers, and the target cannot be attacked by any other unit in the map while it dragged...2) You can give the unit invulnerability (like I did in the hashtable-version) to make it immune against all kinds of damage. Then, in your trigger, instead of dealing damage you simply take away life from the unit.
However, you have to check whether you would kill the unit by decreasing its life, if that is the case, you have to remove invulnerability and deal damage from your caster. This way you make sure that the kill is credited to the caster.
Player Numbers as arrays can guaranteed that this spell won't bug if it being cast by multiple player...?
Yes, I want to damage the target while it was being dragged, but the damage was from triggers, and the target cannot be attacked by any other unit in the map while it dragged...
Is there any other way to make this one happen...?
Because if I make the target Invulnerable, the target takes no damage even from the triggers...
Anyway, I want more damage, I set the DSC_Damage[DSC_CustomValue] as considered the unit only move in 16 steps, so as they move 32 steps they will get twice damage...Set DSC_Damage[DSC_CustomValue] =agility of caster * 1.6 / 32 (unit moves in 32 steps per ability level)
Is this one has to be in JASS...? Or it will the same even in GUI...?in interval do:
if Getunitlife of target>DSC_damage then
set target life = target life - dsc_damage
else
remove invulnerability from target
unit-cause caster to damage target by 9999 (therefore giving caster the kill)
endif
This will damage over time without removing invulnerability unless spell damage is enough to kill directly.
Anyway, I want more damage, I set the DSC_Damage[DSC_CustomValue] as considered the unit only move in 16 steps, so as they move 32 steps they will get twice damage...
Is this one has to be in JASS...? Or it will the same even in GUI...?
I'll fixed the triggers right away...
It can all be done in GUI, I just wrote free-text because I find it easier to think that way.
The premise is, that since the unit is invulnerable, you have to decrease its life by triggers every time you would deal damage.
However, if doing so would kill, then you want your unit to get the kill- rather then them seemingly expiring on their own. That is why I wrote to check each time if enemy health>dmg done.
If the dmg would kill them then you make them vulnerable and deal killing damage instead.
The reason I wrote 9999 is do avoid them surviving with a sliver of health left because they take <100% dmg from spells.
that is the reason for checking if health of target < dmg, and the, but I still can get the credit by killing it, right...?