How do I add function?

Not favoritedFavorited Favorited 0 favourites
  • 4 posts
From the Asset Store
Kids Game
$49 USD
New Sounds Added Update: 115 new sound effects added for no additional cost!
  • hey C3. I agree it's a pretty simple (dumb) question but my old school brain has a pattern of Add Action > Functions > pick from list of functions.

    Now I see three options I'm unfamiliar with and a brief search didn't provide much insight.

    Does anyone have an article or explanation on what these three options mean and which one I should use if I just want the function to execute when the condition is met?

    Thanks in advance and apologies on the question.

  • You can just right click in the event sheet click "Add function".

    Then when you click "+ Add action" --> "Functions" it will show up in the list under the header "Functions".

    Keep in mind that if the function has a return value it will NOT show up in that list. You can only access it through expressions (i.e. "Functions.Function1")

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Oooooohhhh..... Wow. Thank you.

    So I feel like I'm in a dif dimension here.

    The function should calculate several numbers with the result setting a global value with a string.

    I've done this for several years and don't remember struggling with this so much.

    If I want the script to set the global value, how do I need to set it?

  • I think I figured it out. New terminology, old dog.

    The "return type" threw me off and I couldn't make heads/tails of where my function was listed. Thank you for explaining that as I would have driven myself nuts trying to make sense of it.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)