User Tag List

Results 1 to 4 of 4

Thread: The best way to 'deactivate'/'activate' various objects?

  1. #1
    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,558
    Mentioned
    133 Post(s)
    Tagged
    0 Thread(s)

    The best way to 'deactivate'/'activate' various objects?

    Hi, I'd like to make a level where a select few elements of various types (eg. ledges, enemies, doors) are 'greyed out' until you activate them. They'd be faintly visible, and would behave as normal, but the player would not be able to interact with them (would fall through ledges, enemies would not harm him, doors wouldn't open, etc.) , and would be able to walk through them. Once a certain switch in the level had been activated, these elements would become solid, and would behave just like their normal counterparts.

    Ideally, I'd like to be able to just add a single attribute to those elements which are to be greyed out, so that I can control them simply from one place. In other words, I'd like to be able to turn things on and off in the code.

    I first thought that I could achieve this by giving the greyed out elements a qualifier (eg. "neutral"), and then changing that qualifier when it's time to un-grey them (eg. "good"). But it doesn't seem you can change qualifiers on the fly.

    Then, I thought that I could make all greyed out objects have a high translucency, and test for an element's alpha transparency. For example, on my collision code, I'd say "if object has alpha value < 80, then do collisions", which would ignore all the greyed out objects (which would have an alpha of, say, 200). But it doesn't seem that you can test for alpha.

    I can't just use "make visible/invisible", because I need these elements to be faintly visible. Also, "invisible" elements still behave as normal (ie. invisible enemies still hurt you).

    What would the best way be to achieve this? I'd really love to be able to just somehow 'switch' certain elements on and off, without having to put "if, then" statements across all of my code, as that seems like it would add a lot of cpu overhead.

    Thanks in advance

  2. #2
    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
    667
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    You can use a flag to toggle them off and on.
    In the new condition, you just put if flag is on or off and an event.
    You can find flags in the alterable values section in new conditions window and in flags in the drop down object menu.
    EDIT: If you don't want to have "If flag is on then bluh" on all the code that has to do with the object. Simply move them to another layer so the both objects don't collide.
    - BartekB, a.k.a Uppernate
    Join the Click Converse Discord! - https://discord.gg/R3WuvF3mHr

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall Creator Pro
    Ls2's Avatar
    Join Date
    Jun 2011
    Location
    Maceió - Brazil
    Posts
    927
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    You can put all the actions and events inside a group. So, when you activate this group, the objects will turn on. Also, you may create two groups, one with the events related to the behavior "off" and the another with the behavior of "on" state.

  4. #4
    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,558
    Mentioned
    133 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by BartekB View Post
    EDIT: If you don't want to have "If flag is on then bluh" on all the code that has to do with the object. Simply move them to another layer so the both objects don't collide.
    Brilliant. I think this is what I was looking for. A simple, clever way to deactivate anything without having to hardcode anything beforehand.

    Thanks guys.

Similar Threads

  1. Replies: 2
    Last Post: 12th April 2014, 09:10 AM
  2. Activate / De-Activate Layers and/or Groups
    By peejaygee in forum Fusion 2.5
    Replies: 0
    Last Post: 22nd March 2014, 07:09 PM
  3. Deactivate Objects
    By JaJitsu in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 2nd September 2009, 06:30 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
  •