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


Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make Objects de-spawn (disappear).
Apjjm Offline
Is easy to say

Posts: 496
Threads: 18
Joined: Apr 2011
Reputation: 52
#5
RE: How to make Objects de-spawn (disappear).

(05-06-2011, 04:43 PM)Simpanra Wrote: Wow that would be brilliant =D And what do you mean by a secret shelf entity? =) thank you so much for such a swift and informative response =)

Edd,

Edit: Ignore what was here before, easier way:

Give your items and (new) shelf entities to deactivate the following prefix in the editor "shelfDeactivateObjects_" and the ones to activate "shelfActivateObjects_". E.g: "shelfActivateObjects_book_1". Then you can add:
void iWantToMoveMyShelf() {
SetEntityActive("shelfDeactivateObjects_*",false);
SetEntityActive("shelfActivateObjects_*",true);
}
However, your static shelf won't disappear yet with this approach. So you will need to make a new entity (copy the old shelf's entity file) and change it so it is a 0-mass (or very large mass) object so other objects can't push it. Then go into Settings->UserDefinedVars in the model editor, and make it of type "object" and subtype "static" - make sure the body name (not mesh name!) is entered into the "mainPhysicsBody" field (probably called "Body_1"). Replace your old shelf with this new shelf.

If you are going to all this trouble though, it may be easier to just go and make a proper custom shelf entity with the books and stuff on it (you can make it static then), and use a sticky area to rotate it.
(This post was last modified: 05-06-2011, 05:31 PM by Apjjm.)
05-06-2011, 05:04 PM
Find


Messages In This Thread
RE: How to make Objects de-spawn (disappear). - by Apjjm - 05-06-2011, 05:04 PM



Users browsing this thread: 2 Guest(s)