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

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#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~

Ba-da bing, ba-da boom.
(This post was last modified: 01-09-2012, 05:20 AM by Your Computer.)
01-01-2012, 08:17 PM
Find
jssjr90 Offline
Member

Posts: 169
Threads: 39
Joined: Jun 2011
Reputation: 0
#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
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#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
Kman Offline
Posting Freak

Posts: 4,187
Threads: 25
Joined: Jul 2011
Reputation: 219
#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.

Posting Freak
01-09-2012, 05:37 AM
Website Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#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
Website Find
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#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
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#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
Find
Krymtel Offline
Member

Posts: 105
Threads: 9
Joined: Oct 2011
Reputation: 3
#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
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#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
Krymtel Offline
Member

Posts: 105
Threads: 9
Joined: Oct 2011
Reputation: 3
#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




Users browsing this thread: 1 Guest(s)