Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Deleting An Entity
Lewk Offline
Member

Posts: 63
Threads: 6
Joined: Sep 2011
Reputation: 3
#1
Deleting An Entity

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


09-11-2011, 05:57 PM
Find
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#2
RE: Deleting An Entity

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".
(This post was last modified: 09-11-2011, 06:11 PM by Apjjm.)
09-11-2011, 06:11 PM
Find
Lewk Offline
Member

Posts: 63
Threads: 6
Joined: Sep 2011
Reputation: 3
#3
RE: Deleting An Entity

(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.
(This post was last modified: 09-11-2011, 06:23 PM by Lewk.)
09-11-2011, 06:18 PM
Find
UnseenLegend ( NL ) Offline
Member

Posts: 171
Threads: 10
Joined: Sep 2011
Reputation: 12
#4
RE: Deleting An Entity

(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


[Image: read-image.asp?n=n-20121202110321-m.jpg&r=8]
09-13-2011, 01:10 PM
Find




Users browsing this thread: 1 Guest(s)