Jump to content

Making portcullis opened by default?


Ceasirius

Recommended Posts

Hi, in my mod I have a portcullis that is linked to a chain to toggle it to open close, yet I can't figure out how to make the portcullis to be initially in an opened position? Because with enabling disabling it is easy to have things set on "opposite state", but with simple opening I couldn't find a similar flag that would do the job - and looking at vanilla setups didn't help either - even those that are opened when I first enter don't seem to have any special flags checked.

 

Help, anyone?

 

Thanks!

Link to comment
Share on other sites

  • 4 weeks later...
  • 5 months later...

Hmm I figured a way how to bypass it :D It requires a bit of scripting, but it goes as follows:

 

Create two portcullises, no need for them to be activator, static will do - make one in an "open" state and the other one in "closed state".

 

Then spawn 2 levers/pullchains, and create a new script on them (this video will show you how - https://www.youtube.com/watch?v=UQvM520pyjo) and have one to enable "closed" and disable "open", and the other one for the reverse - and just make the "closed" state portcullis disabled at start.

 

I know that its not ideal, as it wont have the animation/sound, and that you need 2 levers rather than one, but it will work :)

 

C.

Link to comment
Share on other sites

Reading this sound quite excessive and makes only sense if the portcullises are not animated

but if you use the vanilla animated portcullises and use them as door you have an option inside the Object-Reference to toggle open by default.

Link to comment
Share on other sites

  • 2 weeks later...

Reading this sound quite excessive and makes only sense if the portcullises are not animated

but if you use the vanilla animated portcullises and use them as door you have an option inside the Object-Reference to toggle open by default.

 

Problem is - that method doesn't seem to be working because as far as I am aware, setting the portcullis as "open as default" doesn't do anything at all (at least doesn't show up in CK, whereas normal doors do), and as far as my memory serves me right, it didn't work in-game either... I struggled quite a bit with this ages ago and then gave up [back then it was with bridges] and now it resurfaced with portcullises.

 

As far as I can tell, the issue is that its not a "door" but an "activator", and that horrendous by-pass was the only thing that came close to solving the issue (it does work on the animated too, but ignores the animation :/)

 

But please correct me if I am wrong, because I'd really be happy if I was :D

Link to comment
Share on other sites

  • 2 weeks later...

Here's the solution.

 

In the References window for the Portcullis (where you were setting "Open By Default", go to the Scripts tab. It is the last tab to the right. To get to the tabs that are not initially visible,you need to click the right arrow located to the right of the tabs (maybe obvious, but you never know what someone might miss).

 

On the Scripts Tab, in the list box (under the column heading "Script Name", there should be a script listed titled "default2StateActivator". Click on the name of this script, then click the Properties button to the right of the list box. This displays the Properties of the Script, which are the Parameters passed in to the Script when it is run. From the list of parameters, select "isOpen". Then click the button to the right of the list, "Edit Value". Since isOpen is a boolean value (true or false), which is shown in the Type column on the list, clicking "Edit Value" will display a checkbox. Check the box labeled isOpen. Click OK, then OK again on the reference window.

 

Now your portcullis should start out open and your pull chain should still toggle it to opened or closed.

 

This worked for me. I am just going through the Creation Kit tutorial and got to the part on Basic Activation, so it this doesn't work for you, maybe you have a more complex setup than my simple example.

 

Hope this helps.

Edited by Feakhelek
Link to comment
Share on other sites

  • 1 month later...
  • 3 months later...

Here's the solution.

 

In the References window for the Portcullis (where you were setting "Open By Default", go to the Scripts tab. It is the last tab to the right. To get to the tabs that are not initially visible,you need to click the right arrow located to the right of the tabs (maybe obvious, but you never know what someone might miss).

 

On the Scripts Tab, in the list box (under the column heading "Script Name", there should be a script listed titled "default2StateActivator". Click on the name of this script, then click the Properties button to the right of the list box. This displays the Properties of the Script, which are the Parameters passed in to the Script when it is run. From the list of parameters, select "isOpen". Then click the button to the right of the list, "Edit Value". Since isOpen is a boolean value (true or false), which is shown in the Type column on the list, clicking "Edit Value" will display a checkbox. Check the box labeled isOpen. Click OK, then OK again on the reference window.

 

Now your portcullis should start out open and your pull chain should still toggle it to opened or closed.

 

This worked for me. I am just going through the Creation Kit tutorial and got to the part on Basic Activation, so it this doesn't work for you, maybe you have a more complex setup than my simple example.

 

Hope this helps.

 

This is the real way to do this ... kudos!

Link to comment
Share on other sites

Hmm I figured a way how to bypass it :D It requires a bit of scripting, but it goes as follows:

 

Create two portcullises, no need for them to be activator, static will do - make one in an "open" state and the other one in "closed state".

 

Then spawn 2 levers/pullchains, and create a new script on them (this video will show you how - https://www.youtube.com/watch?v=UQvM520pyjo) and have one to enable "closed" and disable "open", and the other one for the reverse - and just make the "closed" state portcullis disabled at start.

 

I know that its not ideal, as it wont have the animation/sound, and that you need 2 levers rather than one, but it will work :smile:

 

C.

 

This is not the way to do this ... BUT, I love this guys way of thinking and I have used this method in the past on non-animated doors.

I have to give this guy props for his out of the box way of thinking. This is what I call programming through brick walls.

Edited by NexusComa
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...