tnx TripleX
Why do i get an error when i want to delete entity? I wanted to remove entity when it touched the ground or another entity...
function hit()
{
if (event_type==event_block || event_type==event_entity)
{
ent_remove(my);
}
}
i did everithing Germanunkol wrote (i just replaced the name event_rock with hit)... but everytime rock hits the ground or another entity msgbox pops up saying "invalid arguments in hit: ent_remove(my)"
And another thing. i got another entity created in the room by pressing c key now when a rock hits the entity i want it to disapere. This is what i did...
I attached an action to it and with my.event=disapear;
called on disapear function. in that function i had
if (event_type==event_entity)
{
ent_remove(my);
}
i think i know why that doesnt work... I read in manual that it senses if entity hits another entity while moving... and my entity isnt moving when it is hit. is that right?
what should i use so it would detect entity hitting it?