Posts by Janette5

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.

    Please could you give me a solution or a detailed explanation of how to compile for android currently?
    Thank you very much.

    There's a patch . Download and install it. Then rebuild and resubmit your App like you did before.

    Olivier
    September 3, 2024 at 9:59 AM

    It's possible that preloading sounds has a time limit. Are you playing each sound on its own channel?

    I'm looping music tracks of 2-3 minutes. In one of my games, I have 4 such tracks. But they're set to play from disk and only one is active at a time. These tracks play on a specific channel, and the other sounds play on other channels.

    I don't have any sound issues nor has anyone reported it in either the Android or PC version of the game.

    In that game I have 25 shorter sounds that are preloaded, but they're all 5 seconds or shorter.

    It might then not be your sound. It may be that your computer has enough resources to run the game, and your Android device does not. You can look at the profiler to see where your game spikes if you have 2.5+ and see if that's where the issues are coming in on Android. (or follow TonyThunder's suggestion).

    My apps on Amazon were made in CENSORED, Clickteam Fusion and CENSORED. You don't need a special plugin for a free or paid app, Amazon "wraps" the ordinary app itself. The apps with IAP, I wrote in CENSORED. The apps are published across all the Amazon stores. I checked, they are on Amazon.de.

    My apps will build if I use these settings:

    C:\Program Files\Java\jdk-11

    C:\Users\NAME\AppData\Local\Android\Sdk


    and also if I use these settings:

    C:\Program Files\Android\Android Studio\jbr

    C:\Users\NAME\AppData\Local\Android\Sdk


    You can try to build an .apk using a blank file (Just open an .mfa - change the Android settings and build it.)

    If it builds, then it's one of your extensions causing problems for you. If it doesn't build, try reinstalling Android Studio.

    Edit: I couldn't post this with the names of the other software typed out. I got a message their names are censored. Unbelievable. Their names are on my website under Contact Details.

    Your minimum version should be 5.0 (Fusion still defaults to 4.4).

    Your maximum version for build API should be 34.

    Target should be: 14.0

    Path for the SDK is: C:\Users\MYNAME\AppData\Local\Android\Sdk

    Path for the JDK depends on whether you're using Android or installed it directly from Oracle.

    Unfortunately, I don't know what the path is for the Android Studio version (I had tried several a few years ago but couldn't manage to build an APK until I installed Java directly).

    Installing Java worked for me because I don't use any special extensions. Apparently it doesn't work for everyone.

    I did have problems on my Huawei phone with a game that had preloaded a bunch of sounds. The solution was to save all the sounds as 16 bit files. That is also a built-in feature now (see screenshot).

    Sounds don't also have to be saved as binary data. Fusion automatically includes them in the Android and other builds.

    My sound options under runtime options for the game are:

    • Multi samples - ticked
    • Play samples over frames - ticked
    • Do not mute samples... - not ticked

    Please login to see this attachment.

    You can set a global value. For example, story control = 1, show edit box 1, set story control = 2, etc.

    If you want to check that the player has actually entered text you can set the contents of the edit box to a string and then test if the string is empty.

    For example:

    Player marker 2 = the object the player will click on

    Name2 is the string.


    Then:

    Code
     Name2 = ""
     Set story control back to 1 because the player didn't type in anything.

    Each device (fax machine, printer) and story is its own active object with its own values.

    You will also have global values that store the information to manage the game globally. You don't need to use an ini file yet (you only need it when you want to save the game for the player to stop playing and resume the game next time).


    Each object is its own active. It can have its own variables - referred to as alterable values - or flags. Once a player has clicked on it you set a value to indicate it's been clicked.

    You then test for the value and execute your code based on the value.


    For example, if a player must click on a fax machine four times for four stories:

    Create a value and name it: number of clicks and set it to zero.

    Player clicks on the fax machine, add 1 to the number of clicks.

    If the number of clicks = 1, show 1 story, show a string.

    If the number of clicks = 2, show 2 stories, change the string's text and so on.


    If a player can clicks on any of the devices a combined total of 4 times use global values.

    The process is the same, except this time you have a global value named number of clicks, and every time the player clicks on a device, add 1.

    Test for the global value to equal a certain number and execute some code (remember to limit this so it only runs once).


    For example, number of stories = 3, and the player clicks on a story, then add 1 and now stories = 4.

    When stories = 4, you can change your game to show an animation of a master copy being sent to an editor, or you change the string to say "Master Copy".


    If you need more help, please add comments into your .mfa and post it here. It's easier for us to amend your .mfa to do what you're asking, than to create an example from scratch.

    Not sure where to post this:

    Email notifications from the new forums are erratic. Sometimes I get a notification, sometimes I don't. For example, I've not received any notice in a few days, and when I accessed the forums now, there were 2 replies that should've triggered email notifications.

    I typed the values in manually. You can also spread a value - same effect. Only spreading a value will spread it in the creation order, which might not be the order in which I numbered them.

    I use the value in the events to isolate which child objects to display - see line 10 - the third "Special" command below. I pick up that value and allocate it to a global value. The reason I allocate it to a global value is so I can reference it afterwards - it's a way of saving the value. In line 12 I use this global value.


    Code
    * User clicks with left button on Group.Good
    + Group.Good is visible
    	Group.Neutral : Make invisible
    	Special : Set Countdown to 5
    	Special : Set Calculate XValue  to X( "Group.Good" )
    	Special : Set Top Level Number to My Number( "Group.Good" )
    	Start loop for each one of Group.Neutral, loop name "Place Icons Level2 "

    Also I forgot to add in a command - to only subtract 1 from the countdown if it is larger than 0. This stops unnecessary code running in the background. (Line 16)

    Code
    * Countdown > 0
    + Every 01''-00
    	Special : Subtract 1 from  Countdown

    The system will typically reference and use objects in the sequence in which they're created. But you can also manually allocate a value to the objects and use that to sort them.

    Set a value - either a global or alterable value.

    When you change the image, change the value.


    For example, when you start the animation, set Global Value AnimationIsPlaying = 1.

    Then you can do this:

    AnimationIsPLaying = 1 . *do something *

    When you've reached your last image, set AnimationIsPlaying = 0.

    • The event on line 45 will only include the two objects that are overlapping each other. It will ignore the other objects.
    • Line 12 will stall Fusion because you're doing things in split seconds. You could change that to once every second, or once every 60th of the second and release Fusion to get to the rest of the code.
    • Line 13 might run continuously or not at all - that command - only one action when event loops typically waits for something else to happen. You could improve it by saying if time to exit = 0, set time to exist to -10, which will automatically force it to run once.
    • Line 17 is again going to stall Fusion because it won't have time to do anything else. It could also run multiple times, because as long as the mouse pointer is over the icon, the event will continue to fire. Every time it will reset the time to exist to 30. So it won't start the count down until the player moves the mouse pointer away.
    • Lines 13 and 32 duplicate each other.
    • Line 33 + 34 you don't need to include pick one - and it might be messing with your code. The foreach loop goes through each object and tests the condition. It's by definition picking one.
    • Lines 25, 31 + 37 all give actions for Fusion to run when the hud becomes visible and 31 and 37 both run loops. Fusion can't do them simultaneously, it will execute them in sequence and you might not always get the same results. I'd recommend you combine them so there's only one action and loop.

    ---

    You could probably simplify the entire process by placing the objects on screen where they should be and simply making them visible / invisible based on where the mouse is, instead of trying to run multiple loops to correctly position the objects.

    I'd recommend you stop using the command 'every split second'. You're going to slow down your game with just your UI. Perhaps let players click on something to expand the menu, don't automatically do so after a split second. I'd also recommend you lose your mouse trails.

    Typically Fusion will run through all the commands 60 times a second (frame rate). But if something is happening quicker than that, Fusion must stop and attend to that command - which means it's not getting to the rest of the commands in time. This creates a noticeable lag and may even freeze the game on slower computers.

    As for getting icons to appear in order, you can give them each an alterable value and use that, for example:

    Code
    * Start of Frame
        Group.Children : Spread value 0 in Alterable Value A
        Special : Set Control Value to 0 (global value)
    
    On each one...
    
    * Alterable Value A of Group.Children = Control Value
        Group.Friends : Set X position to X Right( "Group.Children" ) + 20 (or whatever you need to do)
        Special : Add 1 to Control Value

    You can also check if you do need the loops you're running. For example you're running this:

    Code
    * On each one of Group.Friends, loop name "PosX"
        Group.Friends : Set X position to X( "Group.Friends" ) + 40
    
    * Group.Friends is in the play area 
    + Group.Friends is overlapping Group.Friends
    + Pick one of Group.Friends
        Start loop for each one of Group.Friends, loop name "PosX"

    It will probably work the same if you just do this:

    Code
    * Group.Friends is in the play area 
    + Group.Friends is overlapping Group.Friends
    + Pick one of Group.Friends
    
        Group.Friends : Set X position to X( "Group.Friends" ) + 40