Jump to content

Recommended Posts

Posted (edited)

So basically there are two animations on an object and I want to toggle between them through an activator. The animation is of the object moving and the other is a stop animation. So when the moving animation is working and I select the object I want the stop animation to play and when I select it again I want the moving animation to play. How will the script to do this look like?

 

I guessing I'm going to have to use some booleans and whatnot but I don't know how to start it off.

 

Both are gamebryo animations and I'm using the Self.PlayGamebryoAnimation(AnimName, abStartOver = True) line to call them with AnimName being a String Property.

 

Thanks.

Edited by Nutulator
Posted

Like this:

 

Bool toggle

 

Event OnActivate(ObjectReference akRef)

If !toggle

Playgamebryoanimation(anim1)

toggle = true

Else

Playgamebryoanimation(anim2)

toggle = false

Endif

Endevent

  • Recently Browsing   0 members

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