Every Second Create Object (At all instances)

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.
  • Every 2 Seconds> Create Object @ Positon of Active


    Why does the above event only create Object at the most recently placed instance of Active? Must I use a fast loop to create at all instances?

    YouTube: Please login to see this link.
    Twitter: Please login to see this link. or Please login to see this link.

  • Every 2 Seconds> Create Object @ Positon of Active


    Why does the above event only create Object at the most recently placed instance of Active? Must I use a fast loop to create at all instances?

    If I understand your question correctly, you have some active objects, say of type A, and you want create other active objects, say of type B, every 2 seconds, at the position of each A object.

    Because of object scoping, what you experience is normal: the latest created A object will be considered for the position of each created B object.

    To obtain what you want, there are more ways, one is to use a for each loop on the A objects.

    If you want use only a fast loop for it, you may first spread a value to the A objects, so to have an Id sequence, and use that in the fast loop to refer to each one of the A objects

    I hope it makes sense for you.

  • To answer your first question (why does it happen), it might help to remember that, if we think of your event as a grammatical sentence, the Active in your code is an object, not a subject.

    For example, take the sentence collars go on dogs. In this sentence, collar is the subject and dogs are the object. And most people would understand this sentence to be very clear about where collars go: they definitely go on dogs. But the sentence is not totally clear about dogs - do all dogs have collars? not necessarily, maybe some dogs do, and some dogs don't. The sentence leaves this matter rather vague.

    However, take the sentence dogs have collars. This time we've switched the subject and object. This time, the sentence is much clearer about dogs. The sentence seems to - if not state, then at least imply - that indeed all dogs do have collars. Meanwhile, this sentence seems more vague about collars. Do all collars go on dogs? Probably not...probably lots of things have collars, just like how saying dogs have eyes doesn't preclude the fact that lots of other things have eyes too.

    So, when you tell Fusion to create an "Object" at "Active", you are being clearly instructive about the subject (which, perhaps ironically, in this case is called "Object") and vague about the object (which in this case is the "Active"). So, Fusion knows that you want to create an "Object" at some "Active". Though it doesn't actually receive any strong hint from you that you want it at all Actives. Maybe you could say that it interprets your 'sentence' as Create an "Object" at an Active, or perhaps Create an "Object" at the Active. So it grabs the closest Active at hand (which is the most recently created one) and creates one there.


    Now, there is a way to reverse the subject and object. You could use the Launch Object action. You would access this from the Active's dropdown, which would make the Active, rather than the "Object" the centre of attention of this action (ie. the object).


    Please login to see this picture.


    Launching objects is usually for bullets and things, but if you launch it at a speed of 0, then it'll be unmoving, if that's what you want. What's interesting is that if you have a speed above 0, then the object will move, even if it doesn't have any "Movement" (eg. bouncing ball) assigned to it. (I assume it automatically turns it into a bouncing ball object?). Anyway, as you can see below, it creates the object at all instances.

    If this approach doesn't work for you, then I would use a forEach loop, as semar suggested.


    Please login to see this picture.

    Please login to see this link.
    My Fusion Tools: Please login to see this link. | Please login to see this link. | Please login to see this link.

Participate now!

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