Jump to content

Animations do not play as intended


Recommended Posts

Hi guise,
 
I ran into a weird problem that I cannot make sense of myself.
 
What I have is an activator that uses the following script..
 

ScriptName SexoutATHControlDeathclawScript

short bActive
short nIndex
short nAnimation
int iActorValue

ref refActorA
ref refActorB

Begin OnActivate

	if IsActionRef Player

        set refActorA to SexoutATHHall4ActorDeathclaw01
        set refActorB to SexoutATHHall4ActorFemale01

        ; Set new animation index
        if ((nIndex >= 0) && (nIndex < 6))
            set nIndex to nIndex + 1
        elseif (nIndex == 6)
            set nIndex to 11
        elseif (nIndex >= 11)
            set nIndex to 0
	endif

        ; Finish current act
        refActorA.CIOS SexoutNGFinishNow

        ; Switch animation
        if (nIndex > 0)
            set bActive to 1
        else
            ShowMessage SexoutATHAnimationStopped
        endif

	Activate
    endif

End

Begin GameMode

    if bActive

        set iActorValue to refActorA.GetActorValue Variable04

        if ((LogicalAnd iActorValue SexoutNG.FlagInUse) == 0)
            ; Start new animation
            set nAnimation to (1300 + nIndex)

            refActorA.NX_SetEVFl "Sexout:Start::CallVer" 1
            refActorA.NX_SetEVFo "Sexout:Start::ActorA" refActorA
            refActorA.NX_SetEVFo "Sexout:Start::ActorB" refActorB
            refActorA.NX_SetEVFl "Sexout:Start::Duration" 3600
            refActorA.NX_SetEVFl "Sexout:Start::Anim" nAnimation
            refActorA.CIOS SexoutBegin

            ShowMessage SexoutATHAnimationMessage nAnimation

            set bActive to 0
        endif
    endif

End

It switches between the seven Deathclaw animations and a full stop. Now, the weird thing is although it shows that nAnimation changes to the intended number (1301, 1302, ... 1311) it always plays animation 1301..

Should I let the script sleep a few seconds before starting the next animation? I thought just checking Variable04 would be sufficient to see, if there is still something going on.. please halp!?

Thanks,
So

Link to comment

When setting the anim through the new calling method set the value according to the actor.

Since you're using refActorA to call refActorA.NX_SetEVFl "Sexout:Start::Anim" nAnimation you

should be using refActorA.NX_SetEVFl "Sexout:Start::AnimA" nAnimation.

 

As far as I know, there is no Start::Anim, but there is Start::AnimA, Start::AnimB and Start::AnimC.

Since there is no animation being defined, you're likely just playing the default deathclaw animation... 1301.

Link to comment

When setting the anim through the new calling method set the value according to the actor.

Since you're using refActorA to call refActorA.NX_SetEVFl "Sexout:Start::Anim" nAnimation you

should be using refActorA.NX_SetEVFl "Sexout:Start::AnimA" nAnimation.

 

As far as I know, there is no Start::Anim, but there is Start::AnimA, Start::AnimB and Start::AnimC.

Since there is no animation being defined, you're likely just playing the default deathclaw animation... 1301.

I didn't even know you could set the animations per actor.. cool, thanks for telling :lol: .. I used Start::Anim all the time before and never experienced problems with that until now, but what's still puzzeling.. at least for me.. I had a very crude animation changing mechanism before I rewrote it to do the animation changing inside the GameMode block and that early version of the script set the seven animations explicitly inside the OnActivate block using Start::Anim and that worked, too.. that's why I guessed the changing might have been coming too fast inside the GameMode block.. anyway, with your solution it works perfect.. I added another FlagInUse check for actor B - now it works as intended .. thanks to you ^_^

Link to comment

Oh, I was just going off my read of the Sexout scripts themselves. The two scripts that I saw that did animation handling were looking for the specific AnimA-C variables and not Anim. It's entirely possible that there's some handling in one of the scripts I didn't see that uses it.

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use