Basic Question on Scoping

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.
  • Hi all,

    Im still on scoping subject when it come to CF2.5 engine. I dont know, i feel i kinda like CF but fail spectacularly on getting the scope concept.

    Ok, its a simple question for my cloudy mind. CF have autoscope and also bunch of other loop to scope specific object. WHEN is the time we let autoscope do the work and when is the time to iterate through all the objects?

    Because i search on the forum, some simply state :" just do the one line scope" but when i tried, it scope the wrong object or it just affect ALL other object.

    Thanks

    EDIT: FYI, i already get the concept of ForEach. But how about event that involve the same object?Let say object ball collided wil ball?

  • The easiest thing to do is just keep track of some other variables.

    Fusion tracks alterable values as kind of Parent > Child. The first value tracked will always be the object scoped. If you did something like Active A collides with Active B, and Alterable Value ("activeSize") of Active > Alterable Value ("activeSize") of Active, it will scope for the ball with the greater "activeSize" Alterable Value. Then if you, say, call a Destroy command, only the bigger Active will get destroyed.

    Theoretically.

  • I think it's easier to show than to explain - so attached is an example:

    Frames 1, 2 and 3 I use just a single line command and no loops because it affects all the objects - and this will work in most cases.

    Frame 4, I want a very specific object to stop, not all of them - so I run a For Each loop to isolate and stop that particular object.

  • I think it's easier to show than to explain - so attached is an example:

    Frames 1, 2 and 3 I use just a single line command and no loops because it affects all the objects - and this will work in most cases.

    Frame 4, I want a very specific object to stop, not all of them - so I run a For Each loop to isolate and stop that particular object.

    Superb! I understand now:) Thanks

Participate now!

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