User Tag List

Results 1 to 6 of 6

Thread: Is there a way to create unique timer/loop names via Fixed Value call?

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)

    Join Date
    Feb 2015
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is there a way to create unique timer/loop names via Fixed Value call?

    For example: At Start of Frame I have each enemy in their Behaviors write their Fixed Value into an Alterable Value named ID, so that Fusion can differentiate between two enemy Objects that are otherwise the same. This makes it easier to replicate the enemies throughout the game because I can copy+paste them and all of their code to make them function is just sitting in their Behaviors.

    BUT of course you have two or more events with the exact same Timer or Loop names, when those timers/loops are called by name it activates them for both enemies. For example I use a loop call to knock the enemies back when hit; When I hit one enemy the others get knocked back as well, because their loops are all named "knockback".

    So, instead of going into every single enemy on a frame and editing the timer values, I figure it would be easier to call the Alterable Value ID in the timer/loop's name. For example instead of "knockback" it would be "knockbackID", so each enemy has a unique timer/loop call.

    But I don't know how to enter the Alterable Value into the expression editor, it seems to not work. Is there a way to get this done, or maybe an easier way to do this?

  2. #2
    Clicker Fusion 2.5

    Join Date
    Jan 2018
    Posts
    190
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    why dont' you add the id value in the loop or timer?

    ex:
    during the loop "knockback"
    value ID=X
    - go foward

  3. #3
    Clicker Fusion 2.5

    Join Date
    Jan 2018
    Posts
    190
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    this is a stupid example but it show how you can add strings il the name of a loop / timer event
    loop withs stings.mfa

  4. #4
    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
    659
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    The expression editor does not select objects. You have to choose a condition that belongs to the enemy object. For example, compare enemy position X/Y, or compare enemy alterable value to another value. Those conditions do the actual work.

    For example, this will not work:
    KnockbackID of "Knockback Manager" == ID("Enemy")

    In the above case, Fusion checks KnockbackID with the first instance of Enemy it finds and gets its ID, so it never does actual filtering against Enemy objects and all of them are still selected.


    This should work:
    ID of Enemy == KnockbackID of "Knockback Manager"

    In this case, Fusion goes through each Enemy and filters out any that do not match KnockbackID, leaving you with one object selected (which then executes the actions listed under it). The difference between those cases is the condition chosen.

    Also, what you're looking for is ForEach Loops. They are different than Fast Loops as you do not manually enter how many times it should repeat, but it is automatically done based on the amount of objects that were selected at the time it was called. Here's an example: ForEachExample.mfa
    - BartekB, a.k.a Uppernate
    Join the Click Converse Discord! - https://discord.gg/7RNXFrC
    Dungeon Raiders! - Link soon™

  5. #5
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleUniversal Windows Platform Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Jonathan's Avatar
    Join Date
    Sep 2013
    Location
    France
    Posts
    242
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    I never used "Start the evenement" option oO
    How it's better than just call a loop for exemple?

  6. #6
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)

    Join Date
    Feb 2015
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by fredetmumu View Post
    this is a stupid example but it show how you can add strings il the name of a loop / timer event
    loop withs stings.mfa
    Ah thanks, that's what I mean I didn't know what text to use in the Expression Editor, the "+ Str$(Global Value A)" part.

    Using "knockback" + Str$(ID( "enemy" )) works, changing the Alterable Value to string form

Similar Threads

  1. Loop names...
    By Reactor in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 2nd July 2007, 03:01 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
  •