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
Level Editor Help Using StaticProp Object With SetEntityActive
AFSStudio Offline
Junior Member

Posts: 25
Threads: 5
Joined: Dec 2011
Reputation: 1
#1
Question  Using StaticProp Object With SetEntityActive

In many custom story was using armour_nice_complete with the script SetEntityActive. The complete Knight Armor Statue.

And there is a second statue called deformed_man that I want to use with the script SetEntityActive. That statue will not disappear, also if I want deactive this entity. The reason why, the statue contains StaticProp. By changing StaticProp To Object in ModelEditor the statue will finally disapears. Problem solved.

But... there is another problem. In LevelEditor. I'm putting the custom entity on my map and it works. But after reloading my map the custom entity is gone and leaves the report by error loading files.

What have I left out?
12-20-2014, 07:33 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: Using StaticProp Object With SetEntityActive

Perhaps a cache file is still referencing the old file. Either way, make sure that the custom entity you saved is located in /entities somewhere. It's also a good idea to copy it to your custom story folder and to have custom_stories added to the resources.cfg file.

What's the error report exactly?

12-20-2014, 08:14 PM
Find
MsHannerBananer Offline
Member

Posts: 218
Threads: 34
Joined: Sep 2013
Reputation: 10
#3
RE: Using StaticProp Object With SetEntityActive

When a custom entity disappears in the level editor, and gives off an error that says to check the log for details, it means that the level editor can't find the entity anymore.

This happens to me constantly. Pretty much my entire full conversion revolves around custom entities and if they aren't in the folders that are indexed for the level editor, they won't stay put, and will eventually disappear the next time the map is opened.

This is, like I've said, because the entity you're referencing can't be loaded, or more accurately, it can't be found by the level editor when you open the map, and this is because the file probably isn't found in the entity/static object folders inside Amnesia, and is instead kept in a custom directory.

Make a new folder inside the entities folder and name it whatever you want, and put any custom entities inside of it. This is so you can find them later, so the level editor can always find them, and so you can easily copy the folder over to your mod/CS when you're ready to distribute it. In distribution, the game will find the necessary custom files on it's own as long as they accompany the custom story in the download.

12-21-2014, 06:36 AM
Find
AFSStudio Offline
Junior Member

Posts: 25
Threads: 5
Joined: Dec 2011
Reputation: 1
#4
RE: Using StaticProp Object With SetEntityActive

I've put my custom entity in the redist/entities folder. And after that the LevelEditor finally found my entity.
No report called: "Found some errors while loading file. Check log for details. File index out of bounds!" Mudbill Smile
But that makes me very curious what would be happen when my custom entity stay only in my custom story folder.

In several tests, I found out:
Of course, the LevelEditor can't find my entity anymore. Because the LevelEditor was programmed to grab datas in given folders in redist. But not in custom_stories folder.

But Amnesia: The Dark Descent seems to be a fuck about that. That game doesn't matter what the LevelEditor was looking around. Smile
Because that game was programmed to grab datas almost in total area.

Finally I put my entity in the redist folder if I'm working on the LevelEditor. And I'm thank you both for the quick report. I have pondered by this problem. Very long time.
12-21-2014, 12:35 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#5
RE: Using StaticProp Object With SetEntityActive

(12-21-2014, 12:35 PM)AFSStudio Wrote: I've put my custom entity in the redist/entities folder. And after that the LevelEditor finally found my entity.
No report called: "Found some errors while loading file. Check log for details. File index out of bounds!" Mudbill Smile
But that makes me very curious what would be happen when my custom entity stay only in my custom story folder.

In several tests, I found out:
Of course, the LevelEditor can't find my entity anymore. Because the LevelEditor was programmed to grab datas in given folders in redist. But not in custom_stories folder.

But Amnesia: The Dark Descent seems to be a fuck about that. That game doesn't matter what the LevelEditor was looking around. Smile
Because that game was programmed to grab datas almost in total area.

Finally I put my entity in the redist folder if I'm working on the LevelEditor. And I'm thank you both for the quick report. I have pondered by this problem. Very long time.

Oh man that thing. I've had that problem once. I fixed it pretty easily, no moving the entities over.

Just add:
<Directory Path="/custom_stories" AddSubDirs="true" />
To your resources.cfg in the redist and then you're done. No moving files around and stuff.

"Veni, vidi, vici."
"I came, I saw, I conquered."
12-21-2014, 01:42 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#6
RE: Using StaticProp Object With SetEntityActive

^ That works for things like textures, but I don't think it works for entities and static objects.

In MainEditorSettings.cfg you can specify the folders for entities, static objects, maps and other folders. However you can only specify 1 folder, so changing it will take away its availability to the stock assets.
<Directories EditorHomeDir="HPL2" EditorTempDir="Temp" ThumbnailsDir="Thumbnails" MapsDir="maps" StaticObjectsDir="static_objects" EntitiesDir="entities" LightsDir="lights" BillboardsDir="billboards" ParticlesDir="particles" SoundsDir="sounds" />

(This post was last modified: 12-21-2014, 04:01 PM by Mudbill.)
12-21-2014, 03:59 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#7
RE: Using StaticProp Object With SetEntityActive

(12-21-2014, 03:59 PM)Mudbill Wrote: ^ That works for things like textures, but I don't think it works for entities and static objects.

You sure bro? I used it and it worked. I put ALL of my custom stuff in my CS folder and the Level Editor can find it just fine.

"Veni, vidi, vici."
"I came, I saw, I conquered."
12-22-2014, 12:36 AM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#8
RE: Using StaticProp Object With SetEntityActive

How is it able to find it in your entities tab if it isn't in the entities folder? That tab only lists the categories (folders) in /entities.

12-22-2014, 03:21 PM
Find




Users browsing this thread: 1 Guest(s)