User Tag List

Results 1 to 4 of 4

Thread: Code breaks when using "click on object"

  1. #1
    Clicker Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)

    Join Date
    Oct 2021
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Code breaks when using "click on object"

    This code does not work. However if I replace "user click on object" with "upon pressing 1" for example, it does. Specifically, scoping the first event with "User click on" makes me unable to execute the "Set view logbook entry off" in the second event later, by pressing tab. I removed some of the code from the post, like keypress buffers and stuff. It is something with the user click on object condition.
    Any ideas?


    PARENT EVENT
    * User clicks with left button on Log Entry
    + Player Generic Inventory: View logbook entry is off
    Small log 1 : Make invisible
    Player Generic Inventory : Set View logbook entry on
    CHILD EVENT
    + ID of Log Entry = 1
    Full log 1 : Reappear



    * Upon pressing "Tab"
    + Player Generic Inventory: View logbook entry is on
    Player Generic Inventory : Set View logbook entry off
    Full log 1 : Make invisible
    Small log 1 : Reappear

  2. #2
    Forum Moderator Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleFirefly 3D 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)Mac Export Module (Steam)Universal Windows Platform Export Module (Steam)Firefly 3D Module (Steam)
    NaitorStudios's Avatar
    Join Date
    May 2010
    Location
    Brazil
    Posts
    1,435
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Because you're completely ignoring the fact that it's selecting a specific instance of the object...
    When you click a object it will select that particular instance, and this selection from the parent event will be kept on child events.
    So if you click a instance of Log Entry in the parent event, on the child event it will check if that particular instance has ID = 1

    The more conditions it narrows down the object selection, even if you use child events, it won't add new objects if the parent narrowed down to certain instances.

    I guess you're expecting to click a particular instance but do something to another instance that has a different ID, and you can't do that directly like that.

  3. #3
    Clicker Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)

    Join Date
    Oct 2021
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I see, so if I fastloop on the click, and in the fastloop (on one line without scoping) do the general stuff, it would then work?

    I did: when user click on, set flag0 on and start fastloop.
    Then in the loop did the same thing with only scoping against ID and flag on. Still doesn't work.
    So no parent event this time. Only set flag on, and start loop. Then in loop without conditions set general events. Then following that compare to ID and flag state for individual object scoping.
    Does not work.

    **edit**
    I'm afraid you misunderstand. It's not the scoping of the first event that is broken, it's the second. Where I can not execute "Player Generic Inventory : Set View logbook entry off"
    Which is a general flag. It has no connection to any of the ID'd objects.

    I redid it like this after your post:

    * On loop "clickteam stuff"
    Full log 1 : Make invisible
    Player Generic Inventory : Set View logbook entry on

    * On loop "clickteam stuff"
    + Log Entry: Flag 0 is on
    + ID of Log Entry = 1
    Full log 1 : Reappear
    Log Entry : Set Flag 0 off
    Special : Stop loop "clickteam stuff"

  4. #4
    Clicker Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)

    Join Date
    Oct 2021
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay something is going on, I don't know what. But I just figured out how to fix the problem. So I have a keypress buffer, since tab goes back in menus. So that it won't loop the tab press. This time though, for some reason it breaks the code, and does not loop even without the keypress buffer. It has something to do with the mouse clicking thing, I'm pretty sure, because I have used this same method of scoping so many times in this project already, and now it works differently, and the only difference is that I use "user clicks on".

Similar Threads

  1. "Response code page" in the new Get Object?
    By BartekB in forum Fusion 2.5
    Replies: 3
    Last Post: 24th June 2016, 06:39 PM
  2. Replies: 6
    Last Post: 15th June 2016, 07:05 PM
  3. Animation on the object "Active" on mouse click
    By tiagodias in forum Fusion 2.5
    Replies: 2
    Last Post: 3rd May 2016, 10:01 AM
  4. Replies: 0
    Last Post: 29th October 2015, 09:42 AM
  5. Replies: 14
    Last Post: 22nd February 2015, 05: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
  •