Frictional Games Forum (read-only)
Deleting An Entity - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Deleting An Entity (/thread-10276.html)



Deleting An Entity - Lewk - 09-11-2011

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





RE: Deleting An Entity - Apjjm - 09-11-2011

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".


RE: Deleting An Entity - Lewk - 09-11-2011

(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.


RE: Deleting An Entity - UnseenLegend ( NL ) - 09-13-2011

(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