User Tag List

Results 1 to 6 of 6

Thread: Global functions, possible feature?

  1. #1
    Clickteam Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    BartekB's Avatar
    Join Date
    Aug 2013
    Posts
    622
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)

    Global functions, possible feature?

    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, a.k.a Uppernate
    Join the Click Converse Discord! - https://discord.gg/7RNXFrC
    Dungeon Raiders! - Link soon™

  2. #2
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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).

  3. #3
    Clicker Fusion 2.5 Developer
    PBarwick's Avatar
    Join Date
    Jul 2014
    Posts
    390
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    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.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export Module
    Chrille's Avatar
    Join Date
    Jul 2006
    Posts
    389
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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.

  5. #5
    Clickteam Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    BartekB's Avatar
    Join Date
    Aug 2013
    Posts
    622
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the suggestions! I'll see what I can implement into my app.
    - BartekB, a.k.a Uppernate
    Join the Click Converse Discord! - https://discord.gg/7RNXFrC
    Dungeon Raiders! - Link soon™

  6. #6
    Clicker Fusion 2.5 DeveloperiOS Export ModuleInstall Creator Pro

    Join Date
    Jan 2007
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I started doing this. It gets a bit tricky if you want nested function calls. You'd want some sort of stack data structure to do it properly.

Similar Threads

  1. Replies: 3
    Last Post: 17th December 2014, 09:14 AM
  2. Replies: 4
    Last Post: 11th July 2014, 09:51 PM
  3. lacewing global feature not working
    By Sumo in forum Lacewing
    Replies: 5
    Last Post: 10th August 2013, 05:20 PM
  4. feature request (global event groups)
    By nightofgrim in forum Multimedia Fusion 2 - Technical Support
    Replies: 11
    Last Post: 7th January 2009, 05:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •