User Tag List

Results 1 to 7 of 7

Thread: Why is there no ELSE condition?

  1. #1
    Clicker Fusion 2.5

    Join Date
    May 2015
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Angry Why is there no ELSE condition?

    Hi guys!

    Why is it always the really simple things that cause me the biggest headaches?? haha.

    Okay, so normally when I program, I simply put an else statement in my code but Fusion 2.5 doesn't seem to offer me any way to do that.

    MY PROBLEM:
    I put in two statements;

    If user presses [I] on keyboard AND object is invisible THEN make object visible.
    If user presses [I] on keyboard AND object is visible THEN make object invisible.

    It works fine the first line but the second line doesn't work. I think that's because the condition was already changed by the previous line so it actions both lines in the same loop (so usually I would use an ELSE statement to avoid that from happening).

    I need:
    If object is invisible then make visible ELSE make invisible.

    How do I do that in Fusion 2.5 ?? Thanks

  2. #2
    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator ProUnicode Add-on

    Join Date
    Jun 2011
    Posts
    628
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    Try to reverse event order in the event list >>> err... this would also revert the problem... sorry
    You may need additional flagging, as Coldfire said!

    also, take a look at past threads, it's often asked, i.e.:
    http://community.clickteam.com/threads/85178-How-to-do-a-quot-else-quot-statement

    Also, you may want to check "immediate if" object, that can handle as many "elses" as you may think of

  4. #4
    Clicker Fusion 2.5

    Join Date
    May 2015
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys.

    Reversing the order broke it the other way around sadly... (now it stays invisible upon the key press)

    Flags works perfectly I love how simple that is... thanks ColdFire, this will save me a lot of headaches

    I did try searching the forums first but I didn't find anything. Apparently the word "else" on its own is too common to search and my "else statement" or "else condition" found nothing related. I also find the help files in Fusion rarely bring up anything I'm looking for

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    Reversing the order broke it the other way around sadly... (now it stays invisible upon the key press)
    Uhh yes, you're absolutely correct, my fault!
    I remember fixing some similar problem with this solution, but I can't remember which
    I typed too quickly without checking in depth, and ultimately maybe my issue was not so similar...

    Toggling a flag is the perfect solution!


    As for searching this huge forum resource,
    I often find that I get more convenient results searching "clickteam *******" on google,
    then searching with the forum search feature... so that could be another test to try.

    Good luck with your game

  6. #6
    Clickteam Clickteam
    Simon's Avatar
    Join Date
    Jun 2006
    Location
    UK
    Posts
    2,642
    Mentioned
    58 Post(s)
    Tagged
    3 Thread(s)
    There is an If...Else object available, though I don't think it's cross platform. Check it out from the extension manager built into Fusion

  7. #7
    Clicker Fusion 2.5 DeveloperSWF Export Module

    Join Date
    Sep 2006
    Posts
    511
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this one is off the cuff, so don't punish me if you have a better idea.

    group of events
    if press I activate
    if invisible make visible and deactivate
    if visible make invisible and deactivate

Similar Threads

  1. Else condition
    By FMistakes in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 27th July 2013, 10:22 AM
  2. Help condition
    By Misix in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 22nd December 2011, 03:49 PM
  3. Is this condition possible?
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 13th February 2011, 08:31 PM
  4. swf condition
    By Skyhunter in forum SWF/Flash Export Module Version 2.0
    Replies: 4
    Last Post: 5th November 2010, 02:13 AM
  5. what do you do when a condition....
    By Lillmissthang in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 21st February 2010, 01:50 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
  •