Making shutters


(Vinetio) #1

I am from Holland and I don’t know the correct English word (My dictionary says Shutter) so.

I’m working on a map but I was trying to make a shutter/hatch with a ladder beneath it and you can open the shutter/hatch (Just like Seawall Battery downstairs at the Axis 2nd spawn to the right, down there is the way to the Gun, that shutter/hatch to get down there is what I mean).

I don’t know how to turn .bsp into .map so I couldn’t get it from Battery and I want to make it myself so I can learn from it.

If anyone has a tutorial for this I will be grateful!

Vinetio


(sodsm live) #2

trap door, hatch, plain old door, it’s all the same, it just depends on it’s position.

so you say you want to do it yourself eh? well you can’t just pull stuff out of thin air if you don’t even know where to start. i suggest you first have a look at the script for battery. you don’t need to decompile the bsp but you will need to get in to pk0.pk3 unless someone has the battery.script posted online somewhere. direct your attention to line 383

that script will tell you what your script should look like or closely resemble(you can use your own names).


(DerSaidin) #3

In that script, I believe hatch_controller is a func_invisible_user, hatch is a script mover (don’t forget to include an origin brush in it, at the axle).

I think you could get the same effect using a func_door_rotating. You’d have to turn on the toggle flag, and change the axis.


(fliquid) #4

Ofcourse you can do that. :slight_smile:


(Flippy) #5

One potential problem with using a func_door_rotating for a trap door is the fact that it can be turned both ways, depending on the position of the player who opens it. A hatch or trapdoor is usually only able to open to one side.

So if you want your hatch to open only to one side you have to use a script_mover.

Make a button that will call a piece of script (use a target_script_trigger entity for this). In the script, determine if the door is opened or closed (you can use accums for this) and then open or close it using the faceangles command.

Do a few searches for those keywords and check out the battery hatch script, you might be able to figure it out.

I made a prefab for a hatchdoor some time ago, I might be able to find it again.


(murka) #6

actually a func_door_rotating can be given a spawnflag to open in one way only. the key difference in making with a FDR or a SM(script_mover) is that you can’t stop the door/hatch until triggered again, but with a SM and some scripting, its quite easy.