help with removing entity

Posted By: Schloder87

help with removing entity - 03/30/10 15:57

i have a problem with removing an entity
Quote:


function place_item1()
{

if ((mouse_map == pointer_pcx) || (item1_placed == 1)) {return;}

if (mouse_map == shield_pcx) // picked up the shield
{
item_ptr = shield_pan;

player_weapon = my;
shield_pan.visible = off;
ent_create(shield_mdl, player.x, attach_shield);
shield_on = 1;





item_ptr.pos_x = 117; // set the proper position for the item
item_ptr.pos_y = 698; // on the x and y axis
item_ptr.visible = on; // and make it visible
item1_placed = 1; // slot1 is occupied
mouse_map = pointer_pcx; // restore the initial bitmap (the arrow)
show_pointer = 0; // hide the mouse pointer
}
If ((mouse_map != pointer_pcx) && (item1_placed != 1)) { ent_remove(player_weapon);
}

}


watch the follogwing red part, the entity doestn`t remove!
Posted By: Progger

Re: help with removing entity - 03/30/10 16:09

try ptr_remove laugh
WFG Progger
Posted By: Superku

Re: help with removing entity - 03/30/10 16:13

Did you try this code with a different mouse map than pointer_pcx and shield_pcx?
Otherwise the code won't get executed because item1_placed is 1.
© 2024 lite-C Forums