It looks like there is a an entity problem. I commented the flash part, just to see if the lightnings without flashes would work, and I'm getting error about the sound now... every time it's about an empty pointer... I think it has something to do with:
Code:
pos_flag = 0;
counter = 1;
you = ent_next(NULL); //get first entity
while(you != 0 && pos_flag == 0)
{
if(you.skill1 == 1 && counter == pos_pick)
{
vec_set(line_start.x, you.x);
pos_flag = 1;
cloud = you;
}
if(you.skill1 == 1 && counter != pos_pick)
{
not_cloud = you;
}
counter += 1;
you = ent_next(YOU); //get next entity
}
It's not finding any entities?