Jump to content

Resetting an activators 3d havok animation state?


Recommended Posts

I am creating a cave/dungeon interior which has the bloodskaal puzzle door : TempleEntrancePuzzle01 + TempleEntrancePuzzle02 - as the entrance.
Instead of opening via bloodskaal blade, the player must put their blood into a blood basin etc.

Opening the door is fine - that plays without a hitch.
However... I would like the door to eventually close again.
I am conscious that there is no closing animations for these objects, so the closest I think we could do would be to 'reset' the object somehow - when it is off-screen.

I've tried a number of things - but nothing seems to close the door.

The closest I've managed is to delete the original door and replace it with new instances of the door.
Is there cleaner way to do this?
I've tried objRef.Reset(), parentCell.Reset(), tried playing the 'NONE' animation on the doors etc.


Function resetDoor()
    Debug.Notification("Reset Door")
    ObjectReference obTemp = Door01.PlaceAtMe(ReplacementDoor01)
    ObjectReference obTemp2 = Door02.PlaceAtMe(ReplacementDoor02)
    
    if !obTemp
        Debug.Notification("Respawn failed")
        return
    endif
        
    float fPosX = Door01.GetPositionX()
    float fPosY = Door01.GetPositionY()
    float fPosZ = Door01.GetPositionZ()
    
    obTemp.SetPosition(fPosX, fPosY, fPosZ)
    obTemp2.SetPosition(fPosX, fPosY, fPosZ)
    
    Door01.DisableNoWait()
    Door02.DisableNoWait()
    Door01.Delete()
    Door02.Delete()


    Door01 = obTemp     
    Door02 = obTemp2 
Endfunction
Link to comment
Share on other sites

Too much scripting for something that can be done simpler.

If the door does not have a close animation.

1) If you have set your cell to 'Reset' after 'X' time, then when the 'Resets' fires the gate will be in its original state / position.

2) Just place an 'Initialy Disabled' inaccessible door and at some point > enable the disabled door > disable the enbled animated door.

Link to comment
Share on other sites

The problem is that I have tried resetting the cell, as well as disabling and enabling the templedoor

When it reappears - it plays the last animation that was issued to it and then it opens when not wanted.

I've used oncellload unload, attach detach etc to detect when if resets are occurring etc

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...