func_episodewall and should go away when the player found at least 6 objectives...
but for some reasons this didnt work...
Can anybody help?
in my custom defs2 there is
Code: Select all
float currentobjs;
Code: Select all
void() OBJ_Pickup =
{
currentobjs = currentobjs + 1; // adds one Objective
sprint(other, "You collected ");
sprint(other, "a Ojective!\n");
sound(other, CHAN_AUTO, "pickup_medikit.wav", 1, ATTN_NORM);
stuffcmd (other, "bf\n");
remove(self);
};
void() obj_book =
{
Precache_Set ("progs/pickups/book.mdl");
self.netname = "OBJ_Book";
self.touch = player_touch;
self.th_action = OBJ_Pickup;
self.solid = SOLID_BBOX;
setsize(self, '-11 -11 0', '11 11 55');
};
Code: Select all
void() func_episodewall =
{
setmodel (self, self.model);
self.angles = '0 0 0';
self.solid = SOLID_BSP;
self.movetype = #MOVETYPE_PUSH;
if (currentobjs = currentobjs == 6) // if we have found 6 of them
remove(self); // go away...
};