Counter Conditional Confusion

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've been trying to figure out why this is not working, and I'm at wit's end. Here's the setup:

    Conditions:
    "LaunchCounter" < 30
    Every 8 seconds
    Pick a random object from zone

    Events:
    Create Projectile from (randomly selected object) - works just fine
    Launch Projectile toward (direction) at speed 10 - works just fine
    Set speed (of Projectile) to RRandom(5,10) - works just fine
    Add 1 to Counter "LaunchCounter" - DOES NOT WORK AT ALL

    I'm trying to count how many Projectiles have been launched (there can be dozens on the screen at once) and stop launching after a certain amount is reached (in this case 30). Is it impossible to [Add 1 to Counter] if that same counter is part of the conditions of that event?

    I'd hate to have to make ANOTHER counter and then do a compare condition. It seems unnecessary and sloppy, and just downright back coding. There must be something I'm missing.

    I've let it run for several minutes to see if something is being slow on the uptake, and I just end up with TONS of Projectile items on the screen.

  • Are there any conditions in which Launch Counter is set, reduced or reset?

    I am curious if some other assignment is getting in the way. Try also adding 1 to a new global value and check it's progress in the debug console to make sure the event is firing all the way (it should be)

  • There are no other conditions interacting with LaunchCounter.
    I have attempted to add 1 to (or otherwise modify) existing or new counters, and nothing happens.
    I am almost embarrassed to mention it, but I've never encountered a situation where I've needed to consult the debug console. How do I view it?

  • Checking.

    It's Fusion's object selection getting in the way of what you want to do. That event is set up in a weird way, and Fusion's making a guess (that's incorrect) about what you're expecting will happen.

    First, remove "Pick a random object" from that event. That's causing two semi-related problems. Next, manually define the zone using four external variables (counters or alterable values in an object that isn't Active 1):

    X("Active 1") > Starting X
    X("Active 1") < Ending X
    Y("Active 1") > Starting Y
    Y("Active 1") < Ending Y

    And then add one more condition to that event by clicking Active 1 and then selecting Pick or Count > Pick one of "Active 1" at random

    Everything should now work exactly as you expect. :)

    Edited once, last by Snail (July 13, 2014 at 7:03 AM).

  • Alright! Taking some of what you offered, and making a few other changes, it seems to be working now. In order to avoid the zoning parameters, I have just set up some unique spawn Objects and am just randomly picking one of them. And with my setup, I can STILL use the same spawn spots for multiple types of spawned Objects.

    Thanks for the help! I've been working with Fusion for a little while, but had just never encountered anything like that. I think my problem is that I'm STILL trying to approach things from a written programming conditional perspective, where each word does its own thing. Here, there's a bunch of stuff going on at once, and even more behind the scenes. I just have to stop force-feeding it.

Participate now!

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