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
[TUTORIAL] Making Static Entities!
Author Message
JenniferOrange Offline
Senior Member

Posts: 428
Joined: Jun 2011
Reputation: 33
Post: #1
[TUTORIAL] Making Static Entities!
(I will move this to the Wiki as well.)
Surprisingly this is quite easy! You can change any entity in the Item category to a static object. This is helpful in puzzles, chemical ones especially. For this tutorial, I'll show you how easy it is to change!
  1. Open your Model Editor. Hit Open, and search through the entities>item folder to pick the entity you'd like. Once it's loaded in the editor, select the objects Body. This is the green square surrounding it.
  2. Under the Body tab, we're going to have to change a few things. Set Mass to 0. Looking at the bottom of the tab, you'll see quite a few options checked. Uncheck all of them, except for Continuous Collision, Use Surface Effects, and Has Gravity. Only those three should be checked.
  3. Now at the top bar, all the way to the right there is an option called Settings. Click that, then User Defined Variables. Only two things need to be changed; Type>Object and Subtype>Static. Once you change the Type to Object it should automatically change the Subtype to Static. Close the User Defined Variables Box.
  4. Hit File> SAVE AS. I can't stress enough how important it is to make sure you hit SAVE AS. Last thing to do is re-name the object. The easiest way is to add _static to the end. (EX: Say you're making orbpiece_obsidian static. Change the name to orbpiece_obsidian_static and hit Save.) Make sure you keep the new static object in the same folder as its' "brothers".
And that's it! It only takes a few minutes at most, and you can change almost everything! Hope you put this to good use, good luck~

[Image: button.png]
(This post was last modified: 01-09-2012 05:20 AM by Your Computer.)
01-01-2012 08:17 PM
Find all posts by this user Quote this message in a reply
jssjr90 Offline
Member

Posts: 124
Joined: Jun 2011
Reputation: 0
Post: #2
RE: [TUTORIAL] Making Objects Static!
OR you can do it the totally easy way, just pick which entity you want to become static with in the map editor, drop that object in your world. click back on that object you selected, then with in that object properties, go to the "entity" tab, there you still see "StaticPhysics". click that and it will remain static with no gravity what so ever. This is just another way of achieving this goal.
01-09-2012 04:21 AM
Find all posts by this user Quote this message in a reply
flamez3 Offline
Posting Freak

Posts: 1,320
Joined: Apr 2011
Reputation: 57
Post: #3
RE: [TUTORIAL] Making Objects Static!
This would go under the articles section. But I do agree with jssjr90, that way is easier than the way you mention :3

01-09-2012 04:51 AM
Find all posts by this user Quote this message in a reply
Kman Offline
Posting Freak

Posts: 3,278
Joined: Jul 2011
Reputation: 164
Post: #4
RE: [TUTORIAL] Making Objects Static!
(01-09-2012 04:21 AM)jssjr90 Wrote:  OR you can do it the totally easy way, just pick which entity you want to become static with in the map editor, drop that object in your world. click back on that object you selected, then with in that object properties, go to the "entity" tab, there you still see "StaticPhysics". click that and it will remain static with no gravity what so ever. This is just another way of achieving this goal.
That works sometimes, but if you're gonna place a lot of one object down and you need them all to be a static object it's super helpful. Also like it was mentioned in the OP it's the only way you can have an item not be pick-upable, which is extremely helpful if you want the player to use an item on something but still have it stay there once they've placed it.

(◕‿◕✿)
01-09-2012 05:37 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,236
Joined: Jul 2011
Reputation: 216
Post: #5
RE: [TUTORIAL] Making Objects Static!
(01-09-2012 05:37 AM)kman Wrote:  Also like it was mentioned in the OP it's the only way you can have an item not be pick-upable, which is extremely helpful if you want the player to use an item on something but still have it stay there once they've placed it.

PHP Code: (Select All)
SetEntityInteractionDisabled("item_name"true); 

Tutorials: From Noob to Pro
01-09-2012 11:56 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Acies Offline
Posting Freak

Posts: 1,279
Joined: Feb 2011
Reputation: 54
Post: #6
RE: [TUTORIAL] Making Static Entities!
This method is useful in the cases where you would like to use the setentityactive command. Otherwise moving .daes to the "static_objects" folder is superior in many ways. First off it reads the collision surface off the mesh of the model, which is more precise than creating bodies. Secondly, depending on the shape of the mesh it might save you a lot of work :>

This is applies moreso to custom created models.

[Image: mZiYnxe.png]


01-09-2012 06:39 PM
Find all posts by this user Quote this message in a reply
Statyk Offline
Modmau5

Posts: 3,609
Joined: Sep 2011
Reputation: 198
Post: #7
RE: [TUTORIAL] Making Static Entities!
This is a trick useful for a very small amounts of ideas. I can't think of one, but one way I DID use this was in my edition of the 24-hour custom story. I had to make the lantern static so no one would pick up another lantern and clog their inventory, then I just put a halo and interact area around it that set the lantern inactive and played a sound. It was to mimic picking up a lantern, when you're actually not picking one up at all =P

(This post was last modified: 01-09-2012 09:38 PM by Statyk.)
01-09-2012 09:38 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Krymtel Offline
Member

Posts: 105
Joined: Oct 2011
Reputation: 3
Post: #8
RE: [TUTORIAL] Making Static Entities!
(01-09-2012 06:39 PM)Acies Wrote:  This method is useful in the cases where you would like to use the setentityactive command. Otherwise moving .daes to the "static_objects" folder is superior in many ways. First off it reads the collision surface off the mesh of the model, which is more precise than creating bodies. Secondly, depending on the shape of the mesh it might save you a lot of work :>

This is applies moreso to custom created models.


So you're basically saying if you make something a static object, I won't have to make physics bodies for an entity? So that if I made something like a rock a static object, then it will save me the time of having to manually add physics bodies to the rock?

Eidolon Total Conversion (WIP)
01-10-2012 12:51 PM
Find all posts by this user Quote this message in a reply
Acies Offline
Posting Freak

Posts: 1,279
Joined: Feb 2011
Reputation: 54
Post: #9
RE: [TUTORIAL] Making Static Entities!
(01-10-2012 12:51 PM)Krymtel Wrote:  
(01-09-2012 06:39 PM)Acies Wrote:  This method is useful in the cases where you would like to use the setentityactive command. Otherwise moving .daes to the "static_objects" folder is superior in many ways. First off it reads the collision surface off the mesh of the model, which is more precise than creating bodies. Secondly, depending on the shape of the mesh it might save you a lot of work :>



This is applies moreso to custom created models.
So you're basically saying if you make something a static object, I won't have to make physics bodies for an entity? So that if I made something like a rock a static object, then it will save me the time of having to manually add physics bodies to the rock?
So you're basically saying if you make something a static object, I won't have to make physics bodies for an entity? Models located in the "static_objects" folder have no .ent files (no physics bodies).

So that if I made something like a rock a static object, then it will save me the time of having to manually add physics bodies to the rock? Yes, but not much in case of your rock. With more advanced shapes - more time saved. I avoid the ModelEditor, unless there is a special purpose to my model.

[Image: mZiYnxe.png]


(This post was last modified: 01-10-2012 03:51 PM by Acies.)
01-10-2012 03:51 PM
Find all posts by this user Quote this message in a reply
Krymtel Offline
Member

Posts: 105
Joined: Oct 2011
Reputation: 3
Post: #10
RE: [TUTORIAL] Making Static Entities!
(01-10-2012 03:51 PM)Acies Wrote:  
(01-10-2012 12:51 PM)Krymtel Wrote:  
(01-09-2012 06:39 PM)Acies Wrote:  This method is useful in the cases where you would like to use the setentityactive command. Otherwise moving .daes to the "static_objects" folder is superior in many ways. First off it reads the collision surface off the mesh of the model, which is more precise than creating bodies. Secondly, depending on the shape of the mesh it might save you a lot of work :>



This is applies moreso to custom created models.
So you're basically saying if you make something a static object, I won't have to make physics bodies for an entity? So that if I made something like a rock a static object, then it will save me the time of having to manually add physics bodies to the rock?
So you're basically saying if you make something a static object, I won't have to make physics bodies for an entity? Models located in the "static_objects" folder have no .ent files (no physics bodies).

So that if I made something like a rock a static object, then it will save me the time of having to manually add physics bodies to the rock? Yes, but not much in case of your rock. With more advanced shapes - more time saved. I avoid the ModelEditor, unless there is a special purpose to my model.


Trust me man, when a rock is two times bigger than the player, making it a static prop will be a life saver Big Grin

Eidolon Total Conversion (WIP)
01-10-2012 05:43 PM
Find all posts by this user Quote this message in a reply
Post Reply 




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