I seee!
#include <acknex.h>
#include <default.c>
ENTITY* FLOOR;
var ypos;
var hello;
var angle1;
VECTOR box_rotation;
VECTOR centre = vector(0,0,0);
var num_box;
var new_ball_delay;
var iveruntheIamFlyfunk;
typedef struct
{
var lifetime;
ENTITY* model;
} box;
function i_am_fly(box* Thisbox)
{
iveruntheIamFlyfunk += iveruntheIamFlyfunk;
Thisbox.lifetime -= 1;
if (Thisbox.lifetime < 1)
{
ent_remove(Thisbox.model);
ptr_remove(Thisbox);
}
}
function new_box()
{
ypos = 10;
while (ypos < 450)
{
ypos = (ypos + 25);
angle1 = 0;
while (angle1 < 360)
{
angle1 += 360;
box my_box;
/*box object setup stuff */
c_setminmax(my_box.model);
wait(1);
/*box physics setup stuff */
num_box=num_box+1;
i_am_fly(my_box);
}
}
wait(1);
}
Heres the thing though, when the new_box() function is called, it runs, however the special variable i added to check if the "i_am_fly" function was running, "iveruntheIamFlyfunk;" does not increment!
Regardless... what i am trying to do is essentially make some sort of crude particle system, which is where the "lifetime" var comes in. So really it wouldn't be any good just having the i_am_fly() funk running (if SED gives up its prejudice and runs it at all!), once per object, it would have to run repeatedly per frame or the lifetime var wouldn't decrease to the death point for the object!