I've encountered an interesting problem I can't solve for some reason. As you can see on the image below, in this function I pick all of the instances of the "babu" object which fulfill the expression and for each of these, I set 2 coordinates from an array (the object has another 2 coordinates already stored in the kezdo_X and kezdo_Y instance variables).
After that, I try to set the angle of motion for the bullet behavior using the angle() expression with these 4 coordinates. The problem is, that the angle will always be either 0 or -180 in the behavior (checked in debug mode). However, the coordinates gets loaded into the variables just fine, and when I write out the angle() expression's result, it displays the correct angle. Is this some problem with the behavior I don't know about? I've already tried using int() before the angle() expression, and using the custom movement behavior I get the same results.
Any help would be appreciated. Thank you.