yes i know that, the thing is that i dont know is how to make the entire code and where to place it.
i tried something like :
if (item = 5)
level_load("levelname")
i dont know if that's right or not
this is the my code, so you can check it and tell me how to do it right
///////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////
var item = 0;
function main()
{
level_load("z.wmb");
}
PANEL* first_pan =
{
digits (10, 10, 2, *, 1, item);
flags = VISIBLE;
}
action player_script()
{
while(1)
{
my.emask |= (ENABLE_BLOCK | ENABLE_ENTITY | ENABLE_IMPACT);
camera.tilt += joy_1;
camera.tilt -= joy_2;
camera.pan += joy_5;
camera.pan -= joy_6;
camera.x = my.x -150;
camera.y = my.y;
c_move(my, nullvector, vector(joy_force.y/2 , joy_force.x/-2 , 0), GLIDE);
wait(1);
}
}
function bounce_event()
{
if (event_type == EVENT_IMPACT)
{
ent_remove(me); // disappear when hit
item +=1;
}
}
function item_pickup()
{
my.emask |= ENABLE_IMPACT;
my.event = bounce_event;
reset(my,PASSABLE);
}