Jump to content
fullkevlar

How do you make extending drawbridges, ala Deathstar?

Recommended Posts

As per title -   How do you make extending drawbridges?   

Do you have to write a script?

Share this post


Link to post

I generally make them usable func_door entities - they're simplest func_ entity with an already integrated basic movement, so they're pretty much flexible enough for me to use them as doors, bridges and elevators, anything moving on a straight line really. Otherwise you can have them as func_static (maybe with an origin brush too, not sure if it was needed or not) and move them through script.

fullkevlar and NAB622 like this

Share this post


Link to post
2 minutes ago, Ramikad said:

I generally make them usable func_door entities - they're simplest func_ entity with an already integrated basic movement, so they're pretty much flexible enough for me to use them as doors, bridges and elevators, anything moving on a straight line really. Otherwise you can have them as func_static (maybe with an origin brush too, not sure if it was needed or not) and move them through script.

Thank you!

What keys do you use to have them start in the "open" position?

Share this post


Link to post

I think I've got it, thank you for your help.

 

Though in using a func door to slide the bridge, how do you avoid having the bridge piece slide out dark from lack of lightning?

Share this post


Link to post

From what I remember you can just have it extended and tick the start_open option - that should illuminate the bridge because it's technically physically there when compiled. Not 100% sure it works though, but I think I did it this way a few times.

fullkevlar likes this

Share this post


Link to post

@Ramikad pretty much has it on point here. You can script something like this, but if you're just extending a single-piece bridge, func_door is a good option and very user friendly.

A couple points of interest:

  1. I would not make the func_door usable - rather, I would use a trigger_multiple with a wait key, and have it fire the func_door. Otherwise players can accidentally trigger the door multiple times in quick succession, causing the bridge to reverse when it shouldn't.
  2. Make sure you set the crusher flag on the door, or it will reverse when it hits something, like a player or NPC. You can also set dmg to 0 if you don't want it to hurt anyone while crushing.
  3. You can use more than one func_door for this - and if you do, make sure you team them so they don't get out of sync with each other. Otherwise, if one door is blocked, it will reverse, but the others will continue their previous movement.

Also, just a sidenote - I hate using func_static for scripts. It doesn't have any extra utility other than just moving around. func_door and func_wall are just are usable as far as scripts are concerned, and they add extra functionality to the mix. Origin brushes are only required on a scripted mover when it is rotating - although it is good practice to always have one regardless. Without an origin brush or a key/value pair that specifies origin, the origin of any entity is assumed to be 0,0,0, which will screw royally with rotation.

fullkevlar likes this

Share this post


Link to post

You also need to enable "toggle" on the func_door to prevent it from closing again after a couple of seconds.

fullkevlar likes this

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...