This is how i'm trigger it. *PS I've never used mod, what should I place as the dividend. Getting confused. BTW sweetzombie I want to talk to you my map is enaring completion and your heroselection is in there so will be fun for you to see. I also need to ask a question. Can you add me to msn messenger or skype? matthoey86@hotmail.com
Unit - Any Unit dies
Local Variables
Conditions
Actions
General - While (Conditions) are true, do (Actions)
Conditions
((Killing unit) kills (Current)) == (Dividend mod 10)
Actions
Unit - Add 1 Infused Obelisk energy to (Killing unit) from (Killing unit)
UI - Display "working" for (All players) to Subtitle area
For that condition use
((Killing unit) kills (Current mod 10)) == 0
Also I see that you are using a while, try to avoid them, they can be evil - your game will be stuck in the while until it breaks from its condition, so only use a while loop if you know 100% sure its conditions are going to be true very soon
In this case a regular if statement would suffice
And about my libCHS - there is a big fat new update, check the forum topic, replace the old one (works the same way) - it is MUCH better now
I have some heros on the battlefild and I need to write a condition which asks "is this units killcount a multiple of 10". IE 10,20,30,40,50 etc etc
This is what I have but I really don't think it works.
((Picked unit) kills (Default)) == (+ ((1 * 10)))
In functions under math I can't find anything like squareroot or power for this condition.
Use modulo
if (X mod 10 = 0) then X was 10, 20 or 30 etc
@gorang:
try modulo. Square root is in there. how u would trigger it i dunno. I am trying within bounds?
This is how i'm trigger it. *PS I've never used mod, what should I place as the dividend. Getting confused. BTW sweetzombie I want to talk to you my map is enaring completion and your heroselection is in there so will be fun for you to see. I also need to ask a question. Can you add me to msn messenger or skype? matthoey86@hotmail.com
Unit - Any Unit dies
Local Variables
Conditions
Actions
General - While (Conditions) are true, do (Actions)
Conditions
((Killing unit) kills (Current)) == (Dividend mod 10)
Actions
Unit - Add 1 Infused Obelisk energy to (Killing unit) from (Killing unit)
UI - Display "working" for (All players) to Subtitle area
About them being heros I can easily add another condition for unit type classification I think.
Think I got it, will test now. It makes sense.
((Killing unit) kills (Current)) == (Dividend mod 10)
If you want to chat, come to IRC - http://webchat.freenode.net/?channels=SC2Mapster or PM me on forums (irc is faster)
For that condition use ((Killing unit) kills (Current mod 10)) == 0
Also I see that you are using a while, try to avoid them, they can be evil - your game will be stuck in the while until it breaks from its condition, so only use a while loop if you know 100% sure its conditions are going to be true very soon In this case a regular if statement would suffice
And about my libCHS - there is a big fat new update, check the forum topic, replace the old one (works the same way) - it is MUCH better now