Inconsistent Levers

Post » Sun Feb 03, 2013 6:05 pm

I have these levers that activate something in one position, and deactivate them in the other. Problem is, they don't always turn it off. Most of the time they do, but occasionally I'll have to flip it a few times to turn off the activated object. Any ideas why?
User avatar
TWITTER.COM
 
Posts: 3355
Joined: Tue Nov 27, 2007 3:15 pm

Post » Sun Feb 03, 2013 3:24 am

Scripted? If so, can you post it?
User avatar
Add Me
 
Posts: 3486
Joined: Thu Jul 05, 2007 8:21 am

Post » Sun Feb 03, 2013 7:27 am

The levers are just your average dwemer levers. Then I have the thing do this receiving input via the lever as an activate parent:

Scriptname PCKP_OnActivateRepeatCast extends ObjectReference Spell Property mySpell autofloat Property delay autoauto State Inactiveevent OnEndState()  RegisterForSingleUpdate(delay)endEventevent OnActivate(ObjectReference akAC)  gotoState("Active")endEventendStateState Activeevent OnEndState()  UnregisterForUpdate()endEvent  event OnActivate(ObjectReference akAC)  gotoState("Inactive")endEventendStateevent OnUpdate()mySpell.Cast(self, GetLinkedRef())RegisterForSingleUpdate(delay)endEvent
User avatar
Bethany Short
 
Posts: 3450
Joined: Fri Jul 14, 2006 11:47 am

Post » Sun Feb 03, 2013 3:03 am

ScriptName PCKP_OnActivateRepeatCast Extends ObjectReferenceBool bOnSpell Property kMySpell AutoFloat Property fDelay AutoEvent OnActivate(ObjectReference akActionRef)	bOn = !bOn	If bOn		Utility.Wait(fDelay)		kMySpell.Cast(Self, GetLinkedRef())	EndIfEndEvent
?
User avatar
Multi Multi
 
Posts: 3382
Joined: Mon Sep 18, 2006 4:07 pm


Return to V - Skyrim