User Tag List

Results 1 to 9 of 9

Thread: How do sub-events work with object picking?

  1. #1
    Clicker Fusion 2.5

    Join Date
    Jul 2006
    Posts
    209
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    How do sub-events work with object picking?

    I have been working under the assumption that sub-events carry over object picking, because they'd be much less useful otherwise. This seemed to be the case at first but I keep running into problems with it not working that way. What are the exact rules when it comes to sub-events and object picking?

    Here's some examples of events that lose their object references and stop working until I undo the sub-event formatting:

    https://i.imgur.com/xHYXsN0.png

    This one, the sub-event affects ALL members of the group.NPC qualifier. Considering it's inside a foreach loop, that seems very, very off to me:

    https://i.imgur.com/NeDOWXV.png

  2. #2
    Clicker Fusion 2.5

    Join Date
    Jul 2006
    Posts
    209
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Here's another example of object picking not carrying over:

    https://i.imgur.com/mBpLeuh.png

    Here's what I have to do to make object picking work in it:

    https://i.imgur.com/pIK6LFX.png

    I have dozens of other events where the object picking seems to work with sub-events. I can't find any rhyme or reason as to why I'm getting trouble. There's several other bugs I'm still solving caused by me reformatting code to sub-events, as well.

  3. #3
    Clicker Fusion 2.5

    Join Date
    Jul 2006
    Posts
    209
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Here's another loss of object picking right below the parent, in a foreach loop:

    https://i.imgur.com/pJPBYQ8.png

    Here's the very clunky workaround:

    https://i.imgur.com/Qr0lLe6.png

    This problem saps sub-events of most of their purpose and usefulness.

  4. #4
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    12,785
    Mentioned
    72 Post(s)
    Tagged
    2 Thread(s)
    Could you upload a simple MFA instead of screenshots please, that would be easier.

  5. #5
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleInstall Creator
    SirEatAlot's Avatar
    Join Date
    Oct 2010
    Location
    Stockholm, Sweden
    Posts
    331
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Calling any fast loop always clears the selection stack, don't know if that's the issue here but it's good to keep in mind...

    I've used and tested sub events a lot and they seem to keep the correct objects selected in most cases, so unless something specific is done to change the selection stack (like calling a fastloop) it should work

  6. #6
    Clicker Fusion 2.5

    Join Date
    Jul 2006
    Posts
    209
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I'd like to give example apps but I've had the exact same code with sub-events give 2 different results, even in my main project. It's like I suspected, aside from loops clearing the picking, sub-events are bugged and will randomly become unstable with references. This confirms my suspicion when I changed one unrelated thing and several sub-events all over the application broke at once.

    I'd also say loops breaking object picking when there's a foreach loop in the parent doesn't make sense. That pick should be locked in.

  7. #7
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    12,785
    Mentioned
    72 Post(s)
    Tagged
    2 Thread(s)
    So you suspect they don't work but you can't give an example? We can't fix suspicions. Can't you upload the MFA you took screenshots from and just say what doesn't work?

  8. #8
    Clicker Fusion 2.5

    Join Date
    Jul 2006
    Posts
    209
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I'm working with very dynamic code so isolating an example of this was hugely challenging. I've done it though.

    In "SubEventBug.mfa" attached, I found a section of code losing its object picking with no fastloop interference. The "right hand" object doesn't get picked properly in line 40. While making this example, I discovered what causes the bug: Any child events deeper in the hierarchy will clear the object picking of events below it but previous in the hierarchy. Here's an image hopefully showing what I mean: https://i.imgur.com/dnU4FzI.png

    Either this is a bug or you should issue a warning about how multi-branch child events clear picking, because it's very misleading and I lost about 10 hours bugfixing this. I really hope it is a bug though because it hinders the usefulness of sub-events quite a bit.

    The other file "ScrollBug.mfa" is a bug that occurred randomly around when I finished this example. I think I was copying, pasting and undoing events and all the sudden the scrollbar was disabled. It stayed that way after a restart of the program and even when I pasted the events to a new frame. Deleting line 42 and undoing it fixed it. Weird.
    Attached files Attached files

  9. #9
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    12,785
    Mentioned
    72 Post(s)
    Tagged
    2 Thread(s)
    Thanks! Yes it looks like a bug.

Similar Threads

  1. Timer Object Do Not work with Group Events
    By gondracorn in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 7th December 2014, 05:01 AM
  2. Collision Events, framerate, and object picking
    By Kid_Roleplay in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 5th February 2014, 12:29 AM
  3. Object Picking Woes
    By MattEsch in forum Multimedia Fusion 2 - Technical Support
    Replies: 6
    Last Post: 8th April 2010, 10:38 PM
  4. need help with picking an object
    By method72 in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 11th September 2009, 01:31 AM
  5. Need help with loops and object picking
    By Isbeorn in forum File Archive
    Replies: 8
    Last Post: 3rd September 2006, 05:17 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
  •