Hey gang. I cobbled together a script based on some vanilla script assets.
The intent is to have the caravan camp appear (enable) when the caravan leader enters a defaultactivateselfTrigger, disappear when the caravan leader leaves the triggerbox.
The actor is set to the caravan leader.
the Linkref is set to the campenable marker which is initially disabled.
All camp tents, etc are enable parented to the marker.
It compiles, and I have the properties set.
I don't think it is working.
Does anyone see any obvious reasons why?
Thanks for all help.
Scriptname DKRActorDisablesixitEnablesEnter extends ObjectReference
{Disables LinkedRef on specified NPC exit, and re-enables it on enter.}
Event onTriggerEnter(ObjectReference triggerRef)
myLinkedRef = GetLinkedRef() as ObjectReference
Actor actorRef = triggerRef as Actor
if (triggerRef == myActor)
myLinkedRef.enable(shouldFade)
endif
endEvent
EVENT onTriggerLeave(objectReference triggerRef)
myLinkedRef = GetLinkedRef() as ObjectReference
Actor actorRef = triggerRef as Actor
if (triggerRef == myActor)
myLinkedRef.disable(shouldFade)
endif
endEvent
Actor Property myActor Auto
{This is the actor who triggers.}
ObjectReference Property myLinkedRef Auto
Bool Property shouldFade = TRUE Auto
{Whether the links should fade or not when enabled/disabled. Defaults to TRUE.}