Hi Guys.

I have an small Problem with an Event Funktion.

k, Thats the code:
Code:
function get_damage_event()
{

if ((EVENT_TYPE == EVENT_impact) && (your.skill7 == 1))
{
	if (my.skill12 > 0) // as long as i have Armor
	{
	my.skill12 -= your.skill8; // Armor get damage by 2
	}
	if (my.skill12 <= 0) // if i dont have any armor 
	{
	my.skill14 -= my.skill12;
	my.skill12 = 0;
	my.skill14 -= your.skill8;
	}
}
}



ok, myskill12 is initialy set to 10
Your.skill8 is set to 2
my.skill14 is set to 10 too.
im fireing 2 rocket to the target.
so each time the rockets hit, is should take 4 points from skill 12
allright, but if i reach skill 12 == 2
it should take 2 from skill 12 and 2 from skill 14
but it takes 2 from skill 12 and 4 from skill 14.
if i set my.skil2 to 1 it works fine, skill 12 is set to 0 and skill 14 is set to 7.
Maybe anyone has an suggestion for this?

Would be very great guys.

Greetings

Mike

Last edited by MikeS; 12/15/09 16:30.