Jump to content

[LE] Disabling an Activator?


Rizalgar

Recommended Posts

Ok, before I go to sleep I have one question for you guyses.

 

How do I disable an Activator?

 

Google has failed me, yet again.

 

Thanks in advance for any replies.

 

Here is the script, which compiles and everything, albeit incomplete, but I cannot select the activator (GardenEastWall) in the Properties window.

Scriptname RS_Construction_ParlorGate extends ObjectReference  

MiscObject Property Gold001 Auto
;;
Message Property RS_Message_Construction_Garden_ParlorDoor Auto
;;
ObjectReference Property GardenEastWall Auto
ObjectReference Property ParlorWall1 Auto
ObjectReference Property ParlorWall2 Auto

Function Enable(bool abFadeIn = false) native

Event OnActivate(ObjectReference akActivator)

	If akActivator != Game.GetPlayer()
		;ignore
	Else
		Int aType = RS_Message_Construction_Garden_ParlorDoor.Show()
			If aType == 0 ;yes
				Int Gold = Game.GetPlayer().GetItemCount(Gold001)				
				If Gold < 1000
					Debug.MessageBox("The Parlor costs 1000 gold")
				Else
					GardenEastWall.Disable(False)
					ParlorWall1.Enable()
					ParlorWall2.Enable()
					Game.GetPlayer().RemoveItem(Gold001, 1000)
				EndIf				
			EndIf
	EndIf
	
EndEvent 
Link to comment
Share on other sites

If the placed reference to "GardenEastWall" does not have that exact name, it will not auto-fill. In that case, you'll have to use the data input boxes made available to you to designate the correct cell and the placed reference. If you do not know the specifics of that placed object, it may very well prove difficult to properly fill.

May I make a suggestion?
Place a single xMarker and link everything you want to enable to it as well as everything you want disabled.
Have the xMarker set to initially disabled and the things to be disabled (already enabled) need to have the "set opposite to enable state parent" check box checked.
Then your script can just enable the xMarker and everything else should enable and disable as needed.

This video may or may not be helpful with regards to my suggestion ( I have not actually watched it).

 

Link to comment
Share on other sites

Holy crap. The way you put it. I've been doing it the hard way and overworking myself. I greatly appreciate it. Just made my life tons easier! I will definitely check out the video as well, thank you Ishara!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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