Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Deleting An Entity
Author Message
Lewk Offline
Junior Member

Posts: 22
Joined: Sep 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
Apjjm Offline
Super Moderator

Posts: 444
Joined: Apr 2011
Reputation: 42
Post: #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 all posts by this user Quote this message in a reply
Lewk Offline
Junior Member

Posts: 22
Joined: Sep 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
UnseenLegend ( NL ) Offline
Member

Posts: 173
Joined: Sep 2011
Reputation: 12
Post: #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 all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)