I am a programmer making a simple sci-fi action game with lite-c.
I have a very strange problem...
my bad guy is using the action below:
action ufo_stuff()
{
ufo = me;
var ufo_in = 0;
while (1)
{
c_move (my, vector(0*time_step, 0.7, 0), nullvector, GLIDE); // move the ship right
ufo_in += 1;
if (ufo_in >= 6000)
{
ent_create("g_laser.mdl", vector (ufo.x, ufo.y, ufo.z), e_fire); //create space junk
}
wait (1);
}
}
yet for some reason the variable "ufo_in" causes my game to freeze but I don't know how or why.
if I watch the variable "ufo_in" the watch says that it stays at "0".
The reason that that doesn't make sence is that after a specific amount of time the game freezes.
That has to be connected to the viable because if I make:
if (ufo_in >= 6000)
larger it takes longer to freeze and vice versa.
I am so confused as to what to do, please help.
rtsgamer706