Scriptname GSCCItemDisplayScript extends ObjectReference  
{Handling Script for Display items - add to trigger where item is to be shown}

MiscObject property myItem auto
{Which item am I made for?}

message property defaultLackTheItemMSG auto
 
bool placed = FALSE

EVENT onActivate(objectReference akActor)
	if placed == FALSE
		if akActor.getItemCount(myItem) >= 1
			blockActivation()
			akActor.removeItem(myItem, 1)
			placed = TRUE
			; notify linked item or enable it
			ObjectReference linked = GetLinkedRef()
			linked.enable()
			blockActivation(FALSE)
		else
			defaultLackTheItemMSG.show()
		endif
	elseif placed == TRUE
		blockActivation()
		akActor.addItem(myItem, 1)
		placed = FALSE
		; notify linked item or disable it 
		ObjectReference linked = GetLinkedRef()
		linked.disable()
		blockActivation(FALSE)
	endif
	
endEVENT

