[LVL ED] Static, non-colliding and de-activeable entity? - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: [LVL ED] Static, non-colliding and de-activeable entity? (/thread-13195.html) |
Static, non-colliding and de-activeable entity? - Shadowfied - 02-09-2012 I've ran into a problem in my custom story. I have a place where there's a note on a door, held up by a stick, like in the screenshot below. (Click on it for full size) First, I found a perfect static object which did the job perfectly as it's static and there's a checkbox called "Collides" meaning that it can be in the door without screwing it up and moving it out of place, but SetEntityActive doesn't work for static objects, as they have no "Active" checkbox. The door is locked and when the player tries to open it, a message appears saying "I should read the note first" so when the note is picked up I want the beam / stick to disappear. I found an identical entity which could work as well, but the problem is that entities do not have the "Collides" checkbox. Anyone know how I can solve this? Thanks in advance. Edit: Solved it by copying the entity and removed all collision options. While this works, it would be nice to be able to do this without having to edit an entity. RE: Static, non-colliding and de-activeable entity? - palistov - 02-09-2012 You could simply deactivate the entity. Entities can be deactivated using script, but static objects cannot. Since you've opted to use an entity over a static object, you can deactivate it when the note is picked up. The script command is SetEntityActive("wood_stick", false); RE: Static, non-colliding and de-activeable entity? - Shadowfied - 02-09-2012 (02-09-2012, 12:44 PM)palistov Wrote: You could simply deactivate the entity. Entities can be deactivated using script, but static objects cannot. Since you've opted to use an entity over a static object, you can deactivate it when the note is picked up.Yes, but the wooden beam / stick is going through the door which glitches it up and moves it out of place. RE: Static, non-colliding and de-activeable entity? - Your Computer - 02-09-2012 I know you found your own workaround, but did you try enabling static physics for the original entity? RE: Static, non-colliding and de-activeable entity? - Shadowfied - 02-09-2012 (02-09-2012, 12:50 PM)Your Computer Wrote: I know you found your own workaround, but did you try enabling static physics for the original entity?Yeah I did. I still need that enabled to avoid the entity falling down to the ground, but even with it enabled it still glitches the door around. RE: Static, non-colliding and de-activeable entity? - Obliviator27 - 02-09-2012 Static the door as well, then unstatic when the player grabs the note. RE: Static, non-colliding and de-activeable entity? - Shadowfied - 02-09-2012 (02-09-2012, 01:23 PM)Obliviator27 Wrote: Static the door as well, then unstatic when the player grabs the note.Very good idea. Will try it later. |