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
Entity showing up in game when not actice
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#5
RE: Entity showing up in game when not actice

It's because in the entity file, under its "User Defined Variables", its Type is set to StaticProp. In short, this basically makes a static_object an entity with no other variables. This is good for making a static_object and if there is something you don't want the player to automatically collide with (as a static_object renders collision directly by mesh. Entities give you the capability of making your own object collision by using shapes in the Model Editor. Doing this is helpful when you have a mesh in a model that you don't want the player to collide with, and a mesh you DO want them to collide with).
A good example of where this could be applied is the pine trees. I'm sure you all have noticed that when walking into a pine tree static_object, it glitches and often, you fall through the map or other objects. This is because there are many strange meshes (leaf planes) jutting out that the player mass collides with, the game struggles to fit the player into it, so it throws the player into the most convenient spot instead--under the map usually. So you could open the tree in the model editor, add a cylinder covering the trunk of the tree and make it into a Body. Attach it to the tree and in the User Defined Variables, it will be labelled "StaticProp" or in my eyes, "static_object.ent" (as you know, you can't set a static_object inactive/active, understand me?). Then when playing the game with this pine_tree.ent in the scene, when you walk into it, you will not collide with the leaves, and you will collide with the trunk.

Enough Entity Type explanation, here's your fix.

What you need to do is:
- Open the entity file for the door in the Model Editor, then go to Settings > User Defined Variables. Change Type to: Object, and SubType to Static. Opposite of what I explained above involving "StaticProps", setting the entity type to "Object" gives the model proper entity variables. In this case, allowing you to set it inactive/active.
- File > Save As...
- Save in your custom story folder somewhere.
- Load your map containing the original door file and select it. In the bottom-right, you will see "Entity File [...]" and locate the new .ent you made.

Save and reload the map in-game and it should load the model inactive.
~~~~

EXTRA TIP:
Make sure you have this directory in your redist resources.cfg:
<Directory Path="/custom_stories" AddSubDirs="true" />
If you do not, when you go to load the level again, the level editor will not read the new file you made and notify you with an error.
(This post was last modified: 03-21-2013, 04:52 AM by Statyk.)
03-21-2013, 04:36 AM
Find


Messages In This Thread
RE: Entity showing up in game when not actice - by Statyk - 03-21-2013, 04:36 AM



Users browsing this thread: 1 Guest(s)