User Tag List

Results 1 to 9 of 9

Thread: Anyway to activate and deactivate groups based on an expression?

  1. #1
    Clicker Fusion 2.5Fusion 2.5 Mac
    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)
    zip2kx's Avatar
    Join Date
    Jun 2015
    Posts
    780
    Mentioned
    17 Post(s)
    Tagged
    0 Thread(s)

    Anyway to activate and deactivate groups based on an expression?

    Is there anyway to activate a group based on e.g. an objects alt value?

    I got different groups for each weapon/skill the player has and currently set manual event to activate and deactivate each one. I would like to compare the object name to a group and if they dont match names, deactivate it.

  2. #2
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)
    ratty's Avatar
    Join Date
    Apr 2012
    Posts
    1,114
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    In situations like that I just make a bunch of Loops that when activated do what I need. I then activate those Loops via expression and get the same result.

  3. #3
    Clicker Fusion 2.5Fusion 2.5 Mac
    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)
    zip2kx's Avatar
    Join Date
    Jun 2015
    Posts
    780
    Mentioned
    17 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ratty View Post
    In situations like that I just make a bunch of Loops that when activated do what I need. I then activate those Loops via expression and get the same result.
    I dont think that works in this situation unless I'm missing something. I would need a loop for every Group i need to de/activate which would still require a event for every group...

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)

    Join Date
    Sep 2017
    Location
    Milano, Italy
    Posts
    130
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Can you use the compare two general values event and activate/deactivate the groups by the result?
    I used it with global values like
    - currentPhase =4 , Activate Group xxx

  5. #5
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    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)

    Join Date
    Jun 2006
    Location
    Killeen, TEXAS
    Posts
    1,037
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    you can find activating or deactivating groups under [special conditions]
    also eg; upon pressing SPACEBAR > activate group (xxx..)

  6. #6
    Clicker Fusion 2.5Fusion 2.5 Mac
    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)
    zip2kx's Avatar
    Join Date
    Jun 2015
    Posts
    780
    Mentioned
    17 Post(s)
    Tagged
    0 Thread(s)
    Guys, what im asking is if there's a way to SELECT the group to be activated by expression, not how to actually activate or deactivate.

    Right now you have to hardcode it by selecting the group in the pop up, i would like to be able to run a loop that would check e.g. an string that says "group 1" and if there is a group with that name, de/activate it.

  7. #7
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export Module
    Sumo's Avatar
    Join Date
    Jul 2008
    Posts
    642
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    No there isn't a way to automate activating/deactivating groups of code using variables as far as I'm aware.

  8. #8
    Clicker 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)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,238
    Mentioned
    86 Post(s)
    Tagged
    0 Thread(s)
    There doesn't seem to be any way to associate a group with a value or string$, so unless there's an extension somewhere that does this, I doubt it's possible to activate/deactivate groups dynamically. I agree it would be very useful if you could!

    Ratty's workaround isn't a bad one. Yes, you'd need to hard-code lots of events, which would be quite inconvenient. But once you did that, at least you'd now have the ability to activate/deactivate a group using a dynamic variable, by dynamically changing the name of the fast loop. Say, for example, you wanted to make the sky change depending on the time of day. You could do something like this:


    every 1 minute
    ------ add 1 to timeOfDay

    always
    ------start loop ("sky"+Str$(timeOfDay))

    on fastloop "sky5"
    ------activate group "make it dawn"

    on fastloop "sky12"
    ------activate group "bring out midday sun"

    on fastloop "sky24"
    ------activate group "make it midnight"



    Still clunky of course, but it's probably slightly more flexible in the long run than having to do the version below.

    every 1 minute
    ------ add 1 to timeOfDay

    timeOfDay = 5
    ------activate group "make it dawn"

    timeOfDay = 12
    ------activate group "bring out midday sun"

    timeOfDay = 24
    ------activate group "make it midnight"

  9. #9
    Clicker Fusion 2.5Fusion 2.5 Mac
    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)
    zip2kx's Avatar
    Join Date
    Jun 2015
    Posts
    780
    Mentioned
    17 Post(s)
    Tagged
    0 Thread(s)
    Really good point Vol!
    I didnt even think of doing something like that, thanks for inspiration.

Similar Threads

  1. Replies: 4
    Last Post: 7th February 2015, 01:46 AM
  2. Replies: 3
    Last Post: 12th May 2014, 06:50 AM
  3. Activate / De-Activate Layers and/or Groups
    By peejaygee in forum Fusion 2.5
    Replies: 0
    Last Post: 22nd March 2014, 07:09 PM
  4. Deactivate/Activate ALL groups at once?
    By N64Mario in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 28th January 2009, 01:31 AM
  5. Activate/deactivate group list - scrollable?
    By Tiny in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 2nd May 2008, 11:51 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
  •