a new bunch of questions

anyone noticed strange behaviour with cooldown on multicasting units?

what it appears to happen if i provide multiple spells on same unit the cooldown on some spell seems to block other spells too

so what is it?

-is cooldown supposed to be a global cooldown for the unit?

-is a ai bug not casting after the first spell goes on cd?

-am i not getting right what cooldown should do?

 

 

is it possible to divide in calculations?

i notice in all the dmg spells the usual "damage is halved blabla"  is always cheated using values you can divide without actually dividing

so it isnt allowed to divide or to get uneven numbers?

or its just a coincidence?

 

 

is there a way to add *specific* dmg ONLY to that source of dmg?

ie, addind blunt dmg that doesnt work at all unless you are using a blunt weapon

or adding fire dmg spell that only increase fire spells, etc etc

 

otherwise is it possible to trigger dmg (or other stats in general) with a check on equipped items?

ie +10 accuracy if using bows or something similar

 

 

thnx

2,777 views 3 replies
Reply #1 Top

Yes, you can divide. Look at Mana Blast for an example.

 

You have to use Heavenfall's BG_UnitStat feature to add blunt to a blunt weapon only. There is no way to do it in the vanilla. There is also no way to get the AI to follow this kind of idea. They will fail with it and not use blunt weapons if a "better" weapon comes along. I decided to use Unitstat_Attack_Boost, which adds +X damage to whatever damage type is equipped. It's not pretty, but it gets the job done.

Reply #2 Top

thnx, ill give a look  at HF stuff but there is already so much to learn im kinda overwhelmed :D

 

btw do ritualists summon work? i dont remember if it was working in vanilla and i just messed something or if it never worked

Reply #3 Top

To answer your division question, computers crash if you attempt to divide by zero so often programs use tricky math techniques to make sure never divide by zero.  Rounding can also be a source of trouble.   In programming, the most common type of variable used for numbers are integers due to their precision.  But integers don't store decimal values (but they do store sign) so rounding errors can occur.  Lastly, if you subtract 5 from 3, you can end up with a negative number so often, math formulas are organized in such a way that you don't end up with a negative number.