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
Damascus Rose Offline
Posting Freak

Posts: 1,107
Threads: 22
Joined: Mar 2012
Reputation: 24
#1
Entity showing up in game when not actice

There is an entity in my map which, no matter what I try and do, shows up when I test the map even though "active" is unchecked. Nothing in my script runs and makes the entity active until later on in the map, but it shows up in the beginning, and I've made sure of this. I even added a line of script that disables the entity when the map loads but it still shows up regardless. Can anyone tell me what's going on?

[Image: damascusrose2.png]
03-21-2013, 12:26 AM
Find
str4wberrypanic Offline
Member

Posts: 241
Threads: 24
Joined: Jul 2012
Reputation: 8
#2
RE: Entity showing up in game when not actice

What's the entity?

03-21-2013, 01:37 AM
Find
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#3
RE: Entity showing up in game when not actice

Have you tried deleting the map_cache files?

In Ruins [WIP]
03-21-2013, 02:21 AM
Find
Damascus Rose Offline
Posting Freak

Posts: 1,107
Threads: 22
Joined: Mar 2012
Reputation: 24
#4
RE: Entity showing up in game when not actice

(03-21-2013, 02:21 AM)NaxEla Wrote: Have you tried deleting the map_cache files?

Doesn't work, and it's the mansion_off_hinges entity

[Image: damascusrose2.png]
03-21-2013, 02:45 AM
Find
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
Damascus Rose Offline
Posting Freak

Posts: 1,107
Threads: 22
Joined: Mar 2012
Reputation: 24
#6
RE: Entity showing up in game when not actice

Thanks a lot Statyk! I understand it now

[Image: damascusrose2.png]
03-21-2013, 05:05 AM
Find




Users browsing this thread: 1 Guest(s)