How do I correctly use function parameters?

0 favourites
  • 5 posts
From the Asset Store
Shatter
$2.49 USD
Shatter effect, with parameters for crack size with an option for crack region and crack animation.
  • Hi there, thank you in advance for taking a look at this for me. I'm hoping it's me being utterly stupid and not something that C3 can't do.

    Here's a function we're trying to use.

    We call this function via this action

    -> Functions (built-in): Call Put_Item_Into_Pockets (Item_to_Pocket: "Item Name", Animate_Pickup: 1)

    However, the Animate_Pickup parameter seems to be ignored and the conditional actions are never run. Am I doing function parameters wrong?

    Would appreciate some insight. Thank you so much!

  • You have an old Function plugin in your project (with blue icon). Find it and remove it.

    With new functions (black icon), you can compare parameters as variables, using "System Compare Variable" condition.

  • Hi dop2000, thank you ever so much for responding.

    Just to clarify, this function is using the new built in function system of C3 (alongside parameters), I do have the original functions object that is used elsewhere in the project (as this is quite an old one now)

    Do I need to convert all functions to the new system?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No, you can use both new and functions in one project.

    Just don't mix them together like on your screenshot. Inside the new function use "System Compare variable" condition to compare parameters. Inside the old function use "Function Compare Parameter" condition.

    You can also rename the old Function object to something like OldFunc to help telling them apart.

  • dop2000, you are a legend!

    Changed it to the System : Boolean check and it works like a charm!

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