Help me with the basics

FlowCanvas Forums Support Help me with the basics

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #721
    lundon
    Participant

    I’m trying to get the raw basics here. Say I want to play a sound when I hit the key Z. What Flow controller or Function do I pick for Down? (This seems so very basic that I hesitated even posting it.)

    #726
    Gavalakis
    Keymaster

    Hello,

    For the most part FlowCanvas uses the Unity native methods to do what you want. So for example here, you could simply use the AudioSource.PlayClipAtPoint function to play an audio clip at a position. You can of course search for it in the browser which you can open up by hitting “Space” in the canvas.
    PlayClipAtPoint

    FlowControllers are only used when you want to change the flow based on some factors (like condition check, or splitting), while Functions are what you should use to do things like the example above.

    Let me know if this works for you and of course if I can help you in any other way.
    Thanks.

    Join us on Discord: https://discord.gg/97q2Rjh

    Attachments:
    You must be logged in to view attached files.
    #733
    lundon
    Participant

    Great. Thanks.
    Now what if I want to play a legacy animation rather than a sound? (and yes, I have been trying the search for a long time now.)

    #737
    Gavalakis
    Keymaster

    Hello,

    You are welcome.
    You can use for example the Animation.CrossFade method for this. In the following example I used CrossFade to play an animation named “Walk” on the Animation component of the gameobject with a crossfade time of 0.2. Of course the gameobject (self) will also need to have the Animation component with an animation clip named “Walk” as well, since that is how Unity works.

    CrossFadeAnimationLegacy

    Let me know if this works for you.
    Thanks.

    Join us on Discord: https://discord.gg/97q2Rjh

    Attachments:
    You must be logged in to view attached files.
    #742
    lundon
    Participant

    Nope. Didn’t work for me. I sent you an email via your contact info on this site.

    #747
    Gavalakis
    Keymaster

    Hey,
    I’ve replied to your email some moments ago.
    Let me know.

    Join us on Discord: https://discord.gg/97q2Rjh

    #800
    kong
    Participant

    Hello~ do not working…

    console: The animation state could not be played because it couldn’t be found!

    Attachments:
    You must be logged in to view attached files.
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.