Frictional Games Forum (read-only)
[SCRIPT] Drawbridge (smooth y-axis change of beams) - 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: [SCRIPT] Drawbridge (smooth y-axis change of beams) (/thread-24211.html)



Drawbridge (smooth y-axis change of beams) - Zokrar - 12-24-2013

Using the cellman_beams, how can I smoothly change their y-axis position with a script? Would it be done using prop scripts?

I want the beam wall to slowly raise up, leaving space for the player to walk under.

[Image: qL2NkUz.png]


RE: Drawbridge (smooth y-axis change of beams) - PutraenusAlivius - 12-24-2013

You can't. It's a static object.


RE: Drawbridge (smooth y-axis change of beams) - Romulator - 12-25-2013

If you want to be sneaky however, you could implement a way to raise it at a distance where they can't see it. In the Level Editor, place another one above it with your desired height, then in script use this to change which one the player can see:
Code:
void SetEntityVisible(string &in asName, bool abVisible)


It may or may not work though. That code really hides the mesh of an entity.


RE: Drawbridge (smooth y-axis change of beams) - Acies - 12-25-2013

Make it a moveobject (in the modeleditor - save as a duplicate) and move it through scripting. I think that you can set it to move a certain axis in the modeleditor - don't be afraid if you test it out in 'physics mode' and it won't move. Having it be a moveobject should allow you to move it through scripting either way.


RE: Drawbridge (smooth y-axis change of beams) - Zokrar - 12-26-2013

Cool, I'll give it a go. Thanks, guys.