Blueprint Dialogue System

Example Animation function

Oh right, you’re passing in a parameter, sorry I was completely overlooking what you were trying to achieve with my last response (Holiday season, so I’m all over the place haha).

The animation ‘laughing’ needs to be converted into the reference of your animation asset, this is done by copying it into the asset table (copy [ctrl+c] the animation asset from the content browser and paste to the AssetReference column)

  1. The “switch on name” case 0 should be the name of the function (PlayAnim).
  2. Place your animation in the asset table (eg. ctrl+c on the asset and paste it
  3. Use GetScriptArg on your Args array to extract the name of the animation from idx 0 (macro available in MLib_Dialogue if you’re using the latest version, else you can find it in BPC_Dialogue and copy it over to your child class)
  4. Get the named asset from the asset table using the extracted animation name (GetAsset dialogue function)
  5. Play animation

I felt that was a bit hard to follow, so I pasted my version here: Animation Dialogue Function posted by anonymous | blueprintUE | PasteBin For Unreal Engine

I also felt that the blueprintue was hard to follow, so I took some screenshots :stuck_out_tongue:

AssetTable

Example Animation Function