Created objects ignore conditions and events?

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • I have an event that creates an active object when I click, and an other event that makes the object change position when it moves out of the play area. However, the objects created by clicking don't change position when they move out of the play area. Only the original active objects do (those that were there from the start). How can I link these created objects to the condition and event?

  • Hard to tell the problem without seeing your code.
    Should work fine if you're using a create object action and the object is the same as your other objects.
    It could be that you're using the action 'shoot an object' to create your objects when clicking or that they're different objects and so need their own events?
    Try uploading a simple example .mfa file that demonstrates the problem.

    Kevin Ayre Please login to see this link.
    My iOS Apps: Please login to see this link., Please login to see this link. and Please login to see this link.

  • I had this issue before and my solution was quite simple, it was creating the new objects on the wrong layer. I'm guessing your issue is something similar, check layers, alt values or flags so the new ones have the same values as the others.

    Please login to see this link.
    Please login to see this link.|Please login to see this link.|Please login to see this link.

  • Well, I found out what was causing the created objects not to change position after leaving the play area.
    It seems that the virtual size is the culprit. When the virtual size is larger than the actual size of the frame, only original objects are affected by the 'leaves the play area' condition. Objects created by events don't seem to obey the condition.

    Now, for my game to work I do need the virtual size to be larger than the actual size. So how would I go about this?

    I added an example to this post in case it's not very clear what I'm talking about. Just try changing the virtual height to 500 and you'll see that it stops working.

  • Adnihil - Tried your example and still works if I set virtual height to 500 HOWEVER if I set virtual height to 600 it shows the bug you mentioned.

    Tried to eliminate the layers (since your original is on Layer 3 and you're creating on Layer 1) but bug still shows.
    I added a counter to display the Total number of objects, to see if the newly created objects were getting destroyed, but they weren't!
    This suggested that they were being made inactive, so I change the 'inactive if too far from window' from automatic to No and it fixes the bug!

    So it would seem that the default 'inactive if too far from window' automatic setting does different things for objects already in the frame and those that are created with actions, which sounds like a bug that needs reporting on the Bug Tracker for fixing in future versions.
    Good find!

    Kevin Ayre Please login to see this link.
    My iOS Apps: Please login to see this link., Please login to see this link. and Please login to see this link.

  • Oh, yeah, forgot to mention that I had tried changing the layers but that didn't seem to affect anything.

    Great! Thank you so much for your help! I had been trying to fix this issue for 2 days, trying all sorts of different things. So glad I can continue with the rest of my game now!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!