Frictional Games Forum (read-only)

Full Version: Deleting An Entity
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello again, forum members. I am trying to delete some entities after collision with an area.

The entites im trying to delete are these:

A monster.

Some storage boxes.

A closet.



So far, I've only been able to delete the closet. It seems that it is incapable of deleting the storage box entities, I've tested this by changing the entity file of one of the boxes to a closet.

As for the monster, he deactivates, but does not disappear.

--------------------------------------

The script for the boxes and closet:

SetPropActiveAndFade("", false, 0.1);

----------------------------------------------

The script for the monster:

SetEnemyDisabled("", true);

----------------------------------------------

Now, I am hoping you guys will be able to guide me on how to do these things correctly? thanks. Smile


For the monster you also need to de-activate it as an entity (SetpropActiveAndFade or SetEntityActive will work here - as would FadeEnemyToSmoke) - so far you have just disabled the "enemy" part of the monster - not the entity itself. Additionally, you can't disable any entities set as "Static prop".
(09-11-2011, 06:11 PM)Apjjm Wrote: [ -> ]For the monster you also need to de-activate it as an entity (SetpropActiveAndFade or SetEntityActive will work here - as would FadeEnemyToSmoke) - so far you have just disabled the "enemy" part of the monster - not the entity itself. Additionally, you can't disable any entities set as "Static prop".


thanks, that worked for the monster.



Also, are you telling me I can't delete entites that I can't move? Because the fact that they dont move is kind of vital to the part.

EDIT: Okay, I got it working. I'd like to just add that you can delete entities that are initially movable, and also when set to static physics. The ones you cant delete are the ones that dont move ever.
(09-11-2011, 05:57 PM)Lewk Wrote: [ -> ]----------------------------------------------

The script for the monster:

SetEnemyDisabled("", true);

----------------------------------------------
monster is an Entity so maybe it works on
SetEntityActive("monster", false); when the Trigger is add