Jump to content

Auto Opening/Closing Slide Doors


Tinislav

Recommended Posts

@DieFaM

 

I tried again after I did what you suggested, this time the script showed up. But still no effect ingame.

It asked me to add properties to the script after saving but I left it blank, does that have anything to do with it?

 

Here's what I mean:

 

 

And thats the ref collection alias window:

 

 

Thanks for not losing patience yet btw.

Edited by Tinislav
Link to comment
Share on other sites

 

The OnActivate() event has only one argument, not two.

Except if you work on RefCollectionAlias or remote events.
I mean, in case of remote events, the syntax would be not just

Event OnActivate(ObjectReference akSenderRef, ObjectReference akActionRef)
EndEvent
but

Event ObjectReference.OnActivate(ObjectReference akSender, ObjectReference akActionRef)
EndEvent
and you have to register for it in the first place.

 

Haven't dabbled with RefCollectionAlias, though. Really nice, yeah.

 

 

 

 

DieFeM's way is a good one, try to implement it. I'm just gonna suggest another way around this. Very dull and straight forward. If the only thing you want to change is those doors in the Institute, why don't you simply add a script locally on every desired door in the Render Window. The script should be as follows (no need to fill the properties, though you can):

Scriptname DCMGAutoCloseDoorSCR extends ObjectReference

float property fTimeToWait = 2.50 auto
{Time to wait before the door will automatically close}

	auto State Openning
		Event OnOpen(ObjectReference akActionRef)
			Utility.Wait(fTimeToWait)
			SetOpen(false)
			GoToState("Closing")
		endevent
	endstate
	
	State Closing
		Event OnClose(ObjectReference akActionRef)
			;busy closing, do not disturb!
			GoToState("Openning")
		endevent
	endstate
Edited by werr92
Link to comment
Share on other sites

45408856812_3ed6bd6ce8_o.jpg


Eat A Carrot, I'm Sure It's Perfectly Safe. LOL No man/lady Autodoors already does this because Wenderer already scripted out that auto open close doors. You want to put that on any door, most of the work is already done. If there's some unspoken rule about being the only one to mentally come up with a solution for anything, well, that's news to me. All those vanilla scripts or you know the huge amount of scripting libraries would be unavaiable. Everyone would have to learn everything all by themself. I can understand if that's the case. Many people think that way. Have you even looked to see if another mod didn't change the institute so that it was improved in this way? Wait a minute, I didn't join a faction, and pretty much everybody in the wasteland hates you. Maybe I can cut this reply short by shooting at you instead.

 

 

BANG BANG,

 

 

0&1

Link to comment
Share on other sites

Well, I did my own test, I though it would fail for whatever reason, but it works.

The only thing I can not see is your list of doors, so I guess you maybe dropped the door references from the "Cell View" to the list, but you must drop the base objects, that's the list I used for my test:

LN4aZj.jpg

 

On the other hand, keep in mind that the script only closes the doors when you open them. Don't expect the doors to be closed when you load a saved game.

 

Also you may want to restrict it to the doors inside of the institute, so, in the conditions of the collection, you should add:

GetInCurrentLocation InstituteLocation == 1

Link to comment
Share on other sites

Hm, okay I tried opening some to see if they cose after some time. I dont know what I did wrong. Maybe I was already in the institute when I loaded that mod, not sure tho.

 

But thanks for your help anyways. Have a nice one :smile:

Edited by Tinislav
Link to comment
Share on other sites

  • Recently Browsing   0 members

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