crgobi Posted March 16, 2013 Share Posted March 16, 2013 DLC2DwePtnWallAnim01 is an animated section of dwemer partition that raises up from the floor. I'm attempting to make it so that when you pull a lever it goes up if it's in the down position, and vice versa. The problem I'm having is that it will go up once, down once, and then stops working entirely. I can't see why it wouldn't continue to animate based on the script. I would appreciate any help with this. :ermm: The animated wall section is connected via activate parent to a vanilla dwemer lever. The script on the wall is as follows: bool property startsUp = false auto bool property isUp = false auto hidden Event OnCellAttach() if startsUp == true playAnimation("stage1") isUp = true endif EndEvent Event onActivate(ObjectReference akActionRef) if isUp == false playAnimation("stage1") isUp = true elseif isUp == true playAnimation("stage2") isUp = false endif EndEvent I'm guessing it might have something to do with the animations this object has rather than the script, because from what I can see there should be no reason why you couldn't pull the lever indefinitely to raise and lower the wall. Link to comment Share on other sites More sharing options...
Pevey Posted March 16, 2013 Share Posted March 16, 2013 Looks to me like it should work, so my tidbits are going to be of limited value. You could try adding some debug.notification() lines to make sure the variables are being set as you expect them to be. e.g., after if isUp == false, add debug.notifcation("isUp = false"). Also, you could try PlayAnimationAndWait instead of PlayAnimation. If it really is a problem with the animation not ending, you will know it because the object won't activate at all after that. The script will be busy. Link to comment Share on other sites More sharing options...
Ghaunadaur Posted March 26, 2013 Share Posted March 26, 2013 This object has a Gamebryo animation, so you need to use PlayGamebryoAnimation(). Link to comment Share on other sites More sharing options...
steve40 Posted April 7, 2013 Share Posted April 7, 2013 I suspect that setting "isUp = true", followed by "elseif isUp == true" is the problem. That will cause the "down" animation to play when you don't want it to. Just replace "elseif isUp == true" with "else". Link to comment Share on other sites More sharing options...
Recommended Posts