Global functions, possible feature?

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • I'd be cool if Fusion had its own functions, like so:

    Writing an expression like "F$(FunctionExample,Parameter/s)" anywhere will execute an "On 'FunctionExample' Function" event, which will have to return a value or string.
    There are some extensions that do this, but are only limited to Windows or just complicate things a lot.

    Are there some extensions I'm missing, is there an alternative, or could this be a Fusion 3 feature?

    Thanks,

    - BartekB

    Join the Click Converse Discord! - Please login to see this link.

  • I use fastloops to do an approximation of this - start a loop 1 times with parameters in global values, and then read the result off another global value (acting sort of like registers, or pass-by-reference values).

    Please login to see this link.
    Please login to see this link.

  • Yeah I do fastloops to do this aswell. Sometimes using global values as variables, sometimes using alterable values of objects. It's a little different but works pretty well.

    SUPER MEGA BEST CAT ADVENTURES Please login to see this link. and Please login to see this link. live now!

  • Same here, but in combination with the string parser/tokenizer objects. The first element being the loop name and the rest being parameters. An event calling a function might look something like this:

    + On event
    - Set Parser to "setCharPos" + "," + Str$(actor value) + "," + Str$(x value) + "," + Str$(y value)
    - Start Loop 'Get Parser First Element'
    (Note: The parser delimiter of course being ",")

    The upside being setting all the parameters with just one action, the downside would be that reading from the parser object might be a bit slower.


    Also, I'm guessing setting up functions will be an option in Fusion 3. It will even be possible to create your own extensions within the program.

    Edited once, last by Chrille (May 8, 2016 at 5:53 PM).

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!