..the entity must appear when we press space bar..
function main()
{
screen_size.x = 800;
screen_size.y = 600;
screen_color.blue = 150;
level_load("");
//ent_create ("2.mdl", vector (1000, 50, -40), NULL);
}
function none() {
my.ambient = 50;
my.lightrange = 300;
vec_set(my.blue,vector(255,50,50));
set(me,BRIGHT);
vec_scale(my.scale_x,0.15);
my.STATE = 1;
}
function go()
{
my.STATE = 1;
while (1)
{
if(my.STATE == 1)
{
if(key_space)
my.STATE = 2; }
if(my.STATE==2) { ent_createlocal("2.mdl",vector(1000,50,-40), none);
my.STATE = 3;
}
if (my.STATE == 3)
{
if (!key_space)
my.STATE = 1;
}
wait(1);
}
}
..if you will able to reply i will appreciate your effort..
..thanks..