Rotating doors script


(morphdoc) #1

Hi, guys, its me again!:smiley:

I have tried looking the forum for the answer, but I failed!

So, as you all now, I am editing adlernest. I have added extra doors (rotating) that I want them to open when the controls are blown (together with the two main doors).

Is there any resource that will tell me how to create a script? I tried using the original script from adlerenst, but it does not work.

Any help appreciated! :slight_smile:


(Loffy) #2

I have no idea how to open (and stay open) doors via script. Perhaps someone else can help you there. In this example, I would create a set of open doors (script_mover) and hide them at match start. When the controls are blow, I would make the visible via script, and, of course, hide the real doors. Not 100% sure if that works though, but I would test it.


#3

You can make this 2 ways

Eighter by using a func_door_rotating
Or by using a func_rotating

Both of them need a origin brush
So 1; make a door
And 2; make a origin for the axis/place it will turn around

Now; select both the origin and the “door”

If you wanna make it simple, make it a func_door_rotating
Otherwise make the func_rotating

Func_door_rotating
Can be a trigged by using alerentity <targetnameOfTheDoor>
It should be locked, key = -1
Scriptname <targetnameOfTheDoor>
Targetname <targetnameOfTheDoor>
And the spawnflag toggle should be selected
Then when it should be opened
Write “alertentity targetnameOfTheDoor” in the script
If it is adlernest it will be the death function of the doorcontrols

Func_rotating is more complicated becouse it needs a very own scriptblock…
Give the func rotating same script and targetname as the door should have…

Scripting
Make a new scriptblock called targetnameOfTheDoor

targetnameOfTheDoor
{
spawn
{
}

trigger move
{
setrotation 0 30 0

wait 3000

stoprotation
}
}

Then write “trigger targetnameOfTheDoor move” without the quotes…
//in the death event of the doorcontrols

Good luck :slight_smile:


(morphdoc) #4

Thanks for you help! I think I didn’t make myself clear.

  1. I want the doors to be locked for both teams and the beginning of the map.
  2. This would be rotating door
  3. Once the control is blown, the door opens automatically and stays opened

This is exactly the same as for the big doors, but they are just rotating

EDIT: sorry, your suggestion worked perfectly! I was doing func_door_rotatintg intead of func_rotating hence I did not work! thanks!