Jump to content

Recommended Posts

Posted

Has anyone made something like this?

 

You can build a bunker door, whereever you want. And can enter the door into the bunker.

Posted

I truly wish I had your imagination and even 1/10 of your abilities. I will of course wait and see if you make this yourself.

Posted

Yes I put one in Mobile Workshop, but have hidden the constructable hatch.

 

Rather than mess about with dynamic load doors, the access hatch and exit ladders are activators with simple OnActivate ... MoveTo scripts.

 

 

 

Scriptname SKK_MWMobileBunkerTrapdoorScript extends ObjectReference Const

Keyword 	Property pWorkshopItemKeyword 		Auto Const Mandatory
ReferenceAlias 	Property Alias_MobileBunkerTrapDoor	Auto Const Mandatory
ReferenceAlias  Property Alias_MobileBunkerMarker       Auto Const Mandatory

;********************************************************************************************************************

;The trapdoor can only be built at MobileWorkshop _co has restriction pSKK_MWMobileWorkshopKeyword
Event OnLoad()
	If Self.HasKeyword(pWorkshopItemKeyword) ; final placement connected to workshop
		ObjectReference OldTrapdoor = Alias_MobileBunkerTrapDoor.GetReference()
		If (OldTrapdoor != None) && (OldTrapdoor != (Self as ObjectReference))
			Alias_MobileBunkerTrapDoor.Clear()
			OldTrapdoor.SetLinkedRef(None, pWorkshopItemKeyword)
			OldTrapdoor.Disable() 
			OldTrapdoor.Delete() ;This may not cleanup the Workshoplink 
		EndIf
		Alias_MobileBunkerTrapDoor.ForceRefTo(Self as ObjectReference)
	EndIf
EndEvent

;********************************************************************************************************************

Event OnActivate(ObjectReference akActivator)
	If (akActivator == Game.GetPlayer())
		Game.GetPlayer().MoveTo(Alias_MobileBunkerMarker.GetReference())
	EndIf
EndEvent

;********************************************************************************************************************

Event OnWorkshopObjectDestroyed (ObjectReference akWorkshopRef)
	If (Alias_MobileBunkerTrapDoor.GetReference() == (Self as ObjectReference))
		Alias_MobileBunkerTrapDoor.Clear() ;release for cleanup
	EndIf
EndEvent

;********************************************************************************************************************

 

 

  • Recently Browsing   0 members

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