Forum rules - please read before posting.

How to call an actionlist.Asset prefab from PlayMaker and play it?

edited September 2014 in Engine development
Hello,

I have some PrefabbedActionLists.asset that I'd really need to call from PlayMaker, due to it being an asset and not a gameobject i cannot specify it to "SendMessage", so how would I call these?

thanks 

Comments

  • To call an asset through PlayMaker, you'd have to create an intermediate.  Either send "Interact" to a scene-based Cutscene that merely has the Engine: Run ActionList Action that's set to run the asset, or call a function within a custom script.

    The following line of code would run an asset stored in the assetToRun variable:

    AdvGame.RunActionListAsset (assetToRun);

    So, placing that in a function called RunAsset and declaring the variable, you'd then be able to send "RunAsset" to a GameObject with it attached to run the asset.
  • Awesome! thanks I kept playing with AC.ActionList and other ones never realized AdvGame had the options I was looking for,

    very helpful.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.