I have been using functions and i was wondering how they work when called into action for multiple times simultaneously.
For Example :
There are 10 enemies and whenever an enemy dies. I call a function which creates an explosion at the enemies position, with the help of the function's parameters to store the enemies X and Y.
Now when 2 enemies die simultaneously . Is the function called 2 times, 1 for each enemy, or is it stacked where it runs for one enemy and once finished, runs for the other enemy, or does it only run once ignoring the second enemy?.
Now i have tried this with very mixed results . I have at times the function called 3 times simultaneously, and the functions sometimes runs twice, or once but never thrice i think. So anyone got any pointers.