Jump to content

How do you make extending drawbridges, ala Deathstar?


Recommended Posts

Posted

As per title -   How do you make extending drawbridges?   

Do you have to write a script?

Posted

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.

OCD2 and NAB622 like this
Posted
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?

Posted

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?

Posted

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.

OCD2 likes this
Posted

@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.

OCD2 likes this

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...