Posts by Pixelthief

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.

    Yeah I think you'll have more success with ChatGPT or other AIs if you ask generalized questions about algorithms, than for technical questions or syntax. Most of the simpler questions of how functions work and platform movements and capabilities of Fusion can best be answered by just pulling up the old school help tab and searching them up

    A minor feature I think would be logical and helpful and probably not break anyone's existing code, would be if multiple "break" statements could exit out of multiple layers of child events. So 1x break exits one layer, 2x break exits 2x layers, etc. Right now a break can only exit out of one control structure, no matter how many you put, so there's no real way to control logic flow in nested child events other than to use flags to track them or disable a code group containing them.

    The "pick object closest to another object" will already specify that. You can find it when doing conditions under object->"pick or count"->Pick closest "object" from another...
    If you have multiple enemy types, you can give them all the same qualifier, then use that qualifier as the enemy you specific in the picking / comparison / aiming code.

    You'll want to have some way of identifying and saving the specific instance of the nearest enemy when the missile is created. Qualifiers will scope all enemies of that class, you want one specific enemy

    You could use an alterable value to identify one enemy, using its fixed ie. So on the code that makes the projectile it could look like this;

    * Upon Pressing {fire key}

    * + Pick "enemy" closest to "player"

    = Create homing missile object

    = Set value A of homing missile to fixed("enemy")


    Now each missile you have will know the fixed ID of the enemy who was closest when it was made. But to make it actually follow that enemy, you'll want code that turns it in that direction. If you have only one missile at at time this is simple, you'd want code like;

    * FixedID("enemy") = value A("homing missile")

    = Homing Missile: Look in direction of Enemy

    But this will only scope one enemy, because that comparison of fixed id :: value a is only occurring once for all objects, using a single missile and finding a single enemy- then all missiles will home in on that same enemy, even if they had different saved targets.

    What you'd want to make each independent missile target a different enemy (if its supposed to) is to iterate through each missile independently with a loop. A for each loop would do great. For example;

    * Always

    = Start For Each Loop "Find Targets" for Homing Missile

    and then

    * On For Each Loop "Find Targets" for Homing Missile

    * FixedID("enemy") = value A("homing missile")

    = Homing Missile: Look in direction of Enemy


    That would go through each missile one by one, compare its value A against all enemies, find the corresponding target and turn towards it.

    Put the folder and its files in the same folder as the mfa, then in the path for the binary data files, replace the start by apppath$ + then the rest of the path.

    So for example:
    C:\Fusion\Projects\Data\image.png

    Lets suppose the mfa is inside Projects, so change it to:
    Apppath$ + "Data\image0.png"

    Then you can use a expression, like:
    Apppath$ + "Data\image" + Index + ".png"

    This will also make sure when you move the mfa with the files, it will find their new location automatically.

    hmm so a lot of other older posts I saw about it said the way to go about including binary data was set aside a separate path like set it in D:/Bin/.... and using that absolute path
    but testing it out, it appears that putting everything in the same origin folder as the exe / build path and using that apppath$ is what did the trick, thanks.

    I guess it was trying to use a non-current-working-directory path that was screwing it up, so hopefully if someone in the future is googling up threads on it like I did with the other ones, they find this one.

    I've been trying to include fairly large volumes of external files into my project's exe that are loaded at runtime via expressions, like generating backdrops or loading tilesets from PNG files, or level INIs and data. After testing the binary data extensively and looking up all the guides and threads, it really doesn't look like it works properly. I made sure I had proper syntax extracting files, loading them from the temp file address, releasing them on app close, etc- and no matter what permutation of where the build path was or data path was really worked, the compiled .exe would still care what folder it was in compared to the absolute path of the files that didn't exist, which is a big no-go. A lot of attempts came up with similar results as other people have reported in other threads, it didn't work at all.

    But the "include external files" option seems to work just as expected. Any files in the same path as the MFA/EXE build folder can be compiled into the exe and will extract as temp files and reference them just fine in the code on other machines regardless of exe location, looks great. Except one huge limitation- this feature is limited to only static file paths and doesn't work with interpreted strings. I can for example have a line that says
    >Load image "C:/Dev/Images/Sword_01.png"
    but I cannot have a line that says;
    >Load image "C:/Dev/Images/" + image_name + ".png"

    I understand the compiler may be flagging static paths to included files and aliasing them for those included in the .exe build, but my question is: Could a feature be added to allow a check at runtime whether an expression matches an included file, and if so, use that instead of looking for an external file? This might require some iterating string comparison and be less optimal, so it could be an optional checkbox. But would it be technically possible? I mean something like taking the string after its resolved and compare it to the original external file path (not temp path) of included files, and if it matches one, load from the temp path of that file instead.

    Its possible to include large numbers of external files without a direct reference in an application's main code by just slapping some deactive dummy code into a spare frame or level that tells an active picture object to load 500 different images or whatever, that's a simple enough solution to make them included without any interface for including external files like data elements allow. But without expressions, the only way to load them in via static paths would be.... creating an absurdly long switch statement kind of code that loads each direct asset based on an input index, like;

    >* On loop "load image"
    >>child events-
    >>* If image_name = "Sword_01"
    >>= Load image "C:/Dev/Images/Sword_01.png"
    >>* If image_name = "Sword_02"
    >>= Load image "C:/Dev/Images/Sword_02.png"
    >>* If image_name = "Sword_03"
    >>= Load image "C:/Dev/Images/Sword_03.png"
    ....

    performance aside, that's a bit problematic when I already have 358 external files of various types and will probably wind up 700+

    There's a function for extracting a middle substring;
    Mid$(>Enter string<, >Enter first character number<, >Enter number of characters<)

    strings are 0-based, so the first character is 0, but the number of characters should be 1+
    ex;

    Mid$(input_string,1,1)

    will give you the second character from a string


    And if you click on the Help tab in Clickteam Fusion, there's a search bar and index where you can look up a basic explanation for most functions built into the platform. If you look up "special object", one of the results will be "special object - expression" which lists all of the functions it contains and what they do, and some basic tips on how to use them. Like;

    Quote

    Extract left sub-string extracts a sub-string from the given string, starting on the left. Example, LEFT$("Hello", 3) will return "Hel".
    Extract right sub-string extracts a sub-string from the given string, starting on the right. Example, RIGHT$("Hello", 3) will return "llo".
    Extract middle sub-string extracts a sub string starting at a given position. Example, MID$("Hello", 1, 3) will return "ell".
    Length of string returns the number of characters in the given string. Example, LEN("Hello") returns 5
    New Line returns a string with new line control characters. The text after these control characters is displayed on the next screen line. Example, "Line 1" + NewLine$ + "Line 2".

    In the expression editor, under the "special" object (two gears icon) it will have a strings category, with expressions for "extract left sub-string", or right or middle
    if all you want is the first letter of a string, you can do

    >Left$(input_string,1)

    which will give you the first letter of a string. You can then compare that to another string
    to do that comparison, you want it inside a "compare two general values" expression
    so for example

    Compare two general values;
    Left$(input_string,1)
    =
    "a"

    will run that event when the 1st digit of that string is "a".
    These comparisons are case sensitive, so you can also use Upper$() and Lower$() to convert between them

    So is animation rate actually independent of framerate? I always had my projects set to 60 fps, so I assumed 100 speed = 1 frame per animation, 50 speed = 2 frames per animation, etc
    I guess one thing that could be changed is to give an option to set animation speeds independent of framerate, so the above would be true even at higher or lower framerates. I just assumed it worked that way already.


    /e actually to be technically accurate, if the above is how it works right now (100 speed = 60 animation frames per second, not 1 animation frame per rendered frame), then such an "animation independent of framerate" should be an option which is on by default, because that's a better description of how it works now, and disabling that option would make animation speeds depend on framerate.

    Just a minor thing-

    The image saved to defaultActiveObject.png will be used for the initial frame of a new active object, but won't be used when creating new animations in an active object.
    If you are editing animations and insert a new one, it still uses the hardcoded default animation with (255,0,255) transparency

    Is it just the skin editor theme being goofed up? Noticed that, its not functional it just set the default skin theme to an odd choice of colors that made all menus look greyed out. They still work, but it inverted the 'locked menu option' colors so everything looks locked.

    Can I send you a pre-version for you to test before putting it in the beta? If so, what version of the program do you use? (standard, dev, Steam, not Steam)

    I'm using MMF2.5 developer, not steam, you can either send me one to try and I'll report back in a jiffy, or try it with that attached .mfa file a few posts back, I assume the glitch should be identical on that one.

    I see... it's due to a 16-bit identifier incorrectly handled as signed value in some cases (so 15 bits = 32768 lines instead of 65536). I tested the fix, it seems OK, this will be in the build 294.6.

    Thanks! I spent the first 5 minutes of debugging prying ctrl buttons off keyboards and reattaching them like a caveman

    I don't think there is any change in this part of the program. Are you sure it's not just when you try to drag a cell at the top of the editor when a tooltip is displayed and intercepts the click?

    I think I isolated it, its not from this update. I coincidentally just yesterday went over the 32768 total events-in-event-editor threshold in my project, and the event editor starts to break down above the 2^15 threshold.
    When you have above 32768 events, dragging/dropping events starts breaking down. It treats it like you're holding down the ctrl button even when you aren't, so dragging/dropping events will append instead of overwriting, and undo/redo gets a bit wonky. Its definitely counting comments in that limit and breaking down at edittime not runtime. I attached an MFA with 33000+ events and you can see it will break down, but if you delete a few thousand events, save it, reload it, it will work normally

    I'm going to be cutting a thousand or more lines of code from my project anyway soon (I'm writing new platforming code, then deleting the old stuff) but I sure would prefer not to have a 33k limit, otherwise I probably have to delete all my code comments (about 30% of the code probably).


    Please login to see this picture.

    Please login to see this attachment.

    In 294.5, but not 294.4 before it, I've been getting issues where at some point using the event editor dragging and dropping an empty cell onto another cell won't erase its events, and dropping a non-empty cell onto another will not erase its events before pasting the new ones. But it doesn't happen right away when I start up the edittime, only after I've been using it a while, haven't isolated why. Something in the latest changes for sure.

    Weird, unable to reproduce it here.

    I found that the property tabs were scaled incorrectly at startup on every new session when I don't have the property window open from the last session (I have all toolbars closed by default except workspace). When I enabled the property toolbar or left it open from a previous session, it would be correctly scaled, whenever I exit without that toolbar open, next session its scaled incorrectly, and I can fix the issue temporarily each session by going toolbars->skin editor->reload. My guess is that the tab size is being calculated at startup based on a non-existent window and scaling wrong

    Don't know if that will reproduce it on your settings though

    Thanks for fixing the sticky menu crash, that was slowing me down quite a bit to avoid it.

    The glitch with property tabs being rescaled to the wrong size still remains. You can still work around it by going to view->toolbars->skin editor->reload. But you have to do it most every time you load up MMF2 if you're messing with displays in the meantime. Just a minor inconvenience, low priority bug
    I don't know whats causing it, I found it both reappeared and persisted whether I was in dual monitor or single screen setups so its probably not a frame scaling issue. It just shows up every time I start MMF2 on any setup

    Please login to see this picture.

    Well in case anyone else looks it up and needs help

    the "Spread Value" function will give each selected object an ascending integer starting at the specified number. So if you say "spread value 0", the first selected object gets 0, the next gets 1, the next gets 2, so on, meaning each will have a unique value you can compare to. If you don't scope an object in the event, all objects of that class will be selected and get a number this way. Objects you create in the future won't have a value assigned.
    From the help description;

    "Spread value
    This action is quite powerful and allows you to spread numbers in an alterable value of multiple instances of an object. Imagine you have 10 instances of an object called "Ball". If you spread a value in Alterable Value A of the Ball object, starting at 1, the first object will have the value 1, the second the value 2, the third 3 etc. up to 10. "