Dear Friends at Epic,
StopAllMontages was a very convenient public function and in Character.h in Beta5 there is no equivalent for the now protected version within the anim instance.
So now the function from the shootergame example:
//in a character class
void AVictoryCharacterBase::StopAllAnimMontages()
{
//modified from shootergameCharacter.cpp
if (Mesh && Mesh->AnimScriptInstance)
{
Mesh->AnimScriptInstance->StopAllMontages(0.1f);
}
}
does not compile
and I do not know how to write an equivalent in Beta5
please explain how to do this without having to write an accessor function in a custom anim instance just to access the protected function
why was it made protected?
Thanks!
Rama
I don’t see that function in our depot, so I think you meant StopAnimMontages? ShooterCharacter has StopAllAnimMontages, but again that is public in the latest depot. Was the function name correct?
Thanks,
–Lina,
Hi there Lina!
I am talking about
AnimInstance.h
protected:
/** Update weight of montages **/
virtual void Montage_UpdateWeight(float DeltaSeconds);
/** Advance montages **/
virtual void Montage_Advance(float DeltaSeconds);
/** Stop all montages that are active **/
void StopAllMontages(float BlendOut);
it is protected
making it VERY hard to use since there is no Character.h accessor for it as there is for the other montage functions in animinstance
could you please move it out of protected
or create an accessor for it in Character.h
currently I am having to write my own accessor in my custom anim instance
Hum… I thought of that first, but that hasn’t changed since long time, so I don’t know why it used to be opened but now protected.
But for that, basically you should be able to call this.
void Montage_Stop(float InBlendOutTime);
There is no multi-montage supports right now, so when you call that, it will stop whatever the currently active. Could you try that?
Thanks,
–Lina,
that’s a good idea!
yea I have a work around for now, just was not sure why that function became protected when it is inaccessible
but now I know why it doesnt matter, cause it is not really implemented yet
thanks for the info Lina!
Rama