12-08-2010, 03:35 PM
Quote:Originally posted by AnImpatientFanWho activates the door?
Grr...
Ran into another issue.
I attached a script to each cage door. Like this:
begin onactivate
if STIPCageDoor01 getopenstate == 0.
setstage STIPTheTrade 20
But the problem is... the door seems to lose its door functions when I use the "begin on activate command"
Using Onactivate --> Normal activation isn't possible.
GetOpenState == 0 means nothing.
Further add a check so that the activate sequence it performed only once.
An example script I wrote (for RW's animated cupboard/closet).
Open is the short that takes care of the check.
Code:
ScriptName StSrContainer
short Open
Begin OnActivate; Play anim
If IsActionRef Player == 1
PlayGroup Forward 1
Set Open to 1
EndIf
End
Begin GameMode
If Open == 0
Return
EndIf
If Open == 2; Run after closing the inventory
Set Open to 0
Playgroup Backward 1
EndIf
If IsAnimPlaying == 1; Wait until anim open ready; If disabled the inventory will open, after closing both anims will be played
Return
EndIf
If Open == 1
Set Open to 2
Activate; Open inventory
EndIf
End
In order to help you, I need more info.
Why not use 'unlock' and guide the NPC by AI?
Just a thought.