I'm new to scripting and have a lot to learn. Just started teaching myself a few months ago :happy: . I'm trying to inject a leveled list into a container based on the location of the container. I added the script to the container. When I use IsInLocation() and the specific location, it works fine. However, if i use GetCurrentLocation and a formlist with the locations it does not. I'm sure it's something easy that I just don't know yet. Was hoping someone could point me in the right direction. Here's what I did.
Scriptname OB_LootFilter extends ObjectReference
FormList Property LocationHousing Auto
LeveledItem Property OB_LLC_ToolBox_Default Auto
LeveledItem Property OB_LLC_ToolBox_Housing Auto
Auto State StartFilter
Event OnLoad()
If LocationHousing.HasForm(Self.GetCurrentLocation())
Self.AddItem(OB_LLC_ToolBox_Housing)
Else
Self.AddItem(OB_LLC_ToolBox_Default)
EndIf
GoToState("DoNothing")
EndEvent
EndState
State DoNothing
Event OnLoad()
EndEvent
EndState