Ah, thank you! I got so hung up on ActionOpenDoor() and DoDoorAction() that I didn't even think to look at the animations themselves.
Now on to the second part of my question. I've gotten the door in question to always open into the room by putting PlayAnimation in the door's OnOpen script (which also has a delayed close and relock script call). However, when a character passes through the door in another area that leads to this door, the animation for this door still defaults to opening away from the character.
This implies to me that the OnOpen event for this door is not firing, so I wrote the following script and put it on the OnOpen event of both doors. However, I must be missing something, because the behavior has not changed.
void main()
{
object oDoor = OBJECT_SELF;
object oDest = GetTransitionTarget(oDoor);
int nAnimation = GetLocalInt(oDoor, "BCH_DOOR_ANIMATION");
// if an animation was specified, play it
// and check the destination door for a specified animation as well
if (nAnimation == 1)
{
PlayAnimation(ANIMATION_DOOR_OPEN1);
nAnimation = GetLocalInt(oDest, "BCH_DOOR_ANIMATION");
if (nAnimation == 1) AssignCommand(oDest, ActionPlayAnimation(ANIMATION_DOOR_OPEN1) );
if (nAnimation == 2) AssignCommand(oDest, ActionPlayAnimation(ANIMATION_DOOR_OPEN2) );
}
else if (nAnimation == 2)
{
PlayAnimation(ANIMATION_DOOR_OPEN2);
nAnimation = GetLocalInt(oDest, "BCH_DOOR_ANIMATION");
if (nAnimation == 1) AssignCommand(oDest, ActionPlayAnimation(ANIMATION_DOOR_OPEN1) );
if (nAnimation == 2) AssignCommand(oDest, ActionPlayAnimation(ANIMATION_DOOR_OPEN2) );
}
}
Any ideas?
(Sorry, my first time posting code here, not sure how to properly format it yet.)
Modifié par BCH, 14 février 2012 - 06:07 .