Frictional Games Forum (read-only)

Full Version: Drawbridge (smooth y-axis change of beams)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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]
You can't. It's a static object.
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.
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.
Cool, I'll give it a go. Thanks, guys.