Pick up CF2.5 once again, few questions on scoping and latest addon

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,

    I had put down CF2.5 for 2 years now, due to frustration doing object scoping.
    Questions
    1. Im willing to start a new and fresh , im learn object scoping for CF last time, a good explanation of how it will fail if dont comply to some rules.But in the end i learn nothing from it.Any other material to learn from?
    I tried various scoping method,fixed id, spread id just to pair up two object,and i had problem when i want to destroy them.

    2.I notice the latest add on is kinda like regular update but need to be purchase. Do all update after this require purchase? But the new features kinda tempting tho.

    Thanks

  • I also abandoned Fusion after I had bought it, and returned it to it later, because I didn’t find Fusion logical. But the mistake I had made in learning Fusion was trying to jump into Fusion at the level I already was in GameMaker – and I had been using it for at least 5 years at the time.

    Once I went back to the basics and wrote a very basic, easy game from scratch, I started understanding how Fusion works a bit better. Although I’d still say I use Fusion based on pattern-recognition rather than any kind of proper understanding of it. But reading the forum posts and asking questions, and sometimes the developers explain their answers – all that helps to get a better grasp of the software.

    Lots of us use Fusion and get around the scoping issues there are, one way or another. The solution there is just to ask for specific help when you get stuck. You can normally solve things by setting a value or turning a flag on or off.

    As for the updates, the 2.5+ is a very specific product enhancement that Clickteam released. They’ve been updating 2.5 without charging for it, for years now and continue to do so. Especially on the Android side they brought in several new requirements with no extra charge.

    Casual games: Please login to see this link.

  • Fusion handles a lot of scoping automatically.

    For example if you have a group of enemies you can give them all the qualifier bad and do something basic like Bullet hits object with Qualifier Bad - destroy that one - and Fusion will find the right enemy to destroy automatically.

    If you want to pair two objects - for example an enemy and it's health bar - you can create them in the same event and Fusion automatically pairs them - that way when you say destroy enemy & health bar - Fusion will know which one.

    Else you can give two objects the same alterable value and then say if Object with Qualifier Bad + Alterable Value A = 3 then do this.

    Or if bullet hits enemy - set Flag 1 on
    and then further test
    If Enemy has flag 1 on - do this.

    Casual games: Please login to see this link.

  • It's actually not too complicated, but it's not documented at all in the help file, which isn't great...

    I made a few little examples here:
    Please login to see this link.
    (I forgot filtered and logical OR operators, but they're pretty self-explanatory)


    At the start of every event, CF2.5 takes all the instances of each object type, and puts them into separate stacks (imagine a stack of coins), with the most recently created one at top, and the oldest at the bottom.
    It then looks at each of the conditions in the event, and any instances which do NOT meet the condition, are removed from the stack. At this point, if you compare a value of ObjectA against a value of ObjectB, CF2.5 will compare the values of each ObjectA against the value of only the top ObjectB on the stack.

    Once all the conditions have been processed, the actions are processed - provided the conditions didn't filter out ALL the instances and a logical (non-filtering - eg. a "Player clicks the mouse" condition) comparison didn't evaluate to false...
    At this point, lets say we want to set a value of ObjectA to a value of ObjectB. CF2.5 will take the value from the instance of ObjectB that is on the top of its stack, and assign that value to the instance of ObjectA at the top of its stack. It then moves down to the next instance on each stack, and does the same again, and so on... If the ObjectB stack runs out before CF2.5 reaches the bottom of the ObjectA stack, CF2.5 just goes back to the top of the ObjectB stack and continues from there.

    But yes, I too have moved on from CF2.5. I've recently been using it again, purely to help out a user on these forums with a complex polygon-based pathfinding system, and it has reminded me why I stopped - it's fantastic for simple things, but it just makes more complicated stuff even more complicated and difficult. I've ended up making my own simple WebGL2 based engine (nothing fancy, but it does everything I need for tile-based, pixel-art-based games).

    Edited once, last by MuddyMole (January 13, 2020 at 4:03 PM).

  • [MENTION=7947]MuddyMole[/MENTION] thanks for the .mfa, im trying to digest how its really work.

    One curiousity,maybe its due to years do this BASIC base engine language.Let take a look at Example 8:Filtering Fix using ForEach Loop for the pink object and this is where i always lose the concept.
    It state like this, ForEach of the pink object, get the one which overlap the blue and get the orange object that has the same id as the filtered pink object. My thinking: is it kinda need two for each loop?One go thru to fetch the pink and one go thru tofetch the orange that match the pink?


    Thanks

  • There's no need to use two ForEach loops there, although it wouldn't actually hurt if you did. If you do that, you're essentially just bypassing the built-in object pairing / scope system altogether. It feels like an inelegant, brute-force kind of solution, but simply wrapping events in ForEach loops can sometimes be an easy fix for issues involving multiple instances.

    The main time when ForEach loops are really fantastic, is when you want to compare multiple instances of the same object type. You can do it without ForEach loops, but they make it so much easier!

    Anyway, here's an explanation of how Example 8 works:
    Please login to see this picture.

Participate now!

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