User Tag List

Results 1 to 6 of 6

Thread: Trying to make a button

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    Iceland
    Posts
    478
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Trying to make a button

    Hi

    I am trying to use an active object to turn sound on and off. In line 19 I say:

    Active 9 is facing right (direction)
    User clicks with left button on object -

    Then Global value S is set to 1 and the direction is changed to left

    Line 20 is

    Active 9 is facing left (direction)
    User clicks with left button on object -

    Then Global value S is set to 0 and the direction is changed to right


    My trouble is that after line 9 I go straight to line 10 so nothing happens. I have tried to restrict the action but that does not help. How can I limit the click so it is triggerd only once at a time.

  2. #2
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)
    alexexhowl's Avatar
    Join Date
    Jan 2015
    Location
    RU, YKT
    Posts
    359
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    that might help -> https://youtu.be/XyMhxF5OUAI

  3. #3
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    Norway
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The problem might be that you set it to 1, then immediately set it to 0 again on the next event.
    Try this instead.

    ( Global Value S + 1 ) mod 2

    This will set Global Value S to 1 if it is 0, and to 0 if it is 1.

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    Norway
    Posts
    333
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    alexexhowl beat me to it. But I didn't know about the xor gate functionality in CF 2.5.
    Looks easier to use so its probably better to do it like alex told you.

    Set Global Value S to: Global Value S xor 1

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    Iceland
    Posts
    478
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thanks for this good help!

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export Module

    Join Date
    Jul 2006
    Location
    Iceland
    Posts
    478
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I will join The ClickFusion Academy 2017 tomorrow

Similar Threads

  1. How to make image as button?H
    By jorma000 in forum Fusion 2.5
    Replies: 4
    Last Post: 3rd January 2017, 09:46 AM
  2. How Do I Make An IOS Jump Button
    By speedyflip in forum iOS Export Module 2.5
    Replies: 10
    Last Post: 17th October 2016, 04:56 AM
  3. Replies: 1
    Last Post: 7th August 2016, 12:14 PM
  4. How can i make a pause button?
    By hassahn in forum Fusion 2.5
    Replies: 10
    Last Post: 16th July 2015, 11:12 PM
  5. Is it possible to make a share button?
    By UnicornMan in forum iOS Export Module 2.5
    Replies: 25
    Last Post: 4th December 2014, 12:13 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
  •