
I've been trying some time to make an activator (In this case, a cart) open a container. No matter what I have tried it would not work. It then struck me I may have better success scripting it to open a nearby Horse's Inventory. What should have been a simple working script is just not doing anything in game. Debug messages appear, but the Inventory screen will not open at all. What is they problem exactly? Here is my script:
Spoiler
Scriptname Driveablehorseinv extends ObjectReference
{Opens cart's inventory when activated while sneaking.}
Event OnLoad()
self.BlockActivation()
EndEvent
Event OnActivate(ObjectReference akActionRef)
self.BlockActivation()
If (DriveableHorse1.IsDead() == false) && (akActionRef == Game.GetPlayer()) && (Game.GetPlayer().IsSneaking() == 1)
Utility.Wait(0.5)
DriveableHorse1.OpenInventory(true)
Else
Utility.Wait(0.01)
self.Activate(akActionRef, true)
EndIf
EndEvent
Actor property DriveableHorse1 Auto
Scriptname Driveablehorseinv extends ObjectReference
{Opens cart's inventory when activated while sneaking.}
Event OnLoad()
self.BlockActivation()
EndEvent
Event OnActivate(ObjectReference akActionRef)
self.BlockActivation()
If (DriveableHorse1.IsDead() == false) && (akActionRef == Game.GetPlayer()) && (Game.GetPlayer().IsSneaking() == 1)
Utility.Wait(0.5)
DriveableHorse1.OpenInventory(true)
Else
Utility.Wait(0.01)
self.Activate(akActionRef, true)
EndIf
EndEvent
Actor property DriveableHorse1 Auto
Thanks in advance for any assistance.
