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
Script Help Drawbridge (smooth y-axis change of beams)
Zokrar Offline
Member

Posts: 85
Threads: 16
Joined: May 2013
Reputation: 0
#1
Drawbridge (smooth y-axis change of beams)

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]

12-24-2013, 08:46 PM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#2
RE: Drawbridge (smooth y-axis change of beams)

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

"Veni, vidi, vici."
"I came, I saw, I conquered."
12-24-2013, 11:49 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#3
RE: Drawbridge (smooth y-axis change of beams)

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:
void SetEntityVisible(string &in asName, bool abVisible)


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

Discord: Romulator#0001
[Image: 3f6f01a904.png]
12-25-2013, 12:23 AM
Find
Acies Offline
Posting Freak

Posts: 1,643
Threads: 60
Joined: Feb 2011
Reputation: 73
#4
RE: Drawbridge (smooth y-axis change of beams)

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.

[Image: mZiYnxe.png]


(This post was last modified: 12-25-2013, 02:19 AM by Acies.)
12-25-2013, 02:18 AM
Find
Zokrar Offline
Member

Posts: 85
Threads: 16
Joined: May 2013
Reputation: 0
#5
RE: Drawbridge (smooth y-axis change of beams)

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

12-26-2013, 05:01 AM
Find




Users browsing this thread: 1 Guest(s)