Questions about spread value

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.
  • Hey,

    I'm writing on behalf of my client who has Asperger's syndrome and isn't able to write here personally. I am her new care worker. She has some questions about spread value.

    She would like to know how to do 3 things:

    1.How to always put a different frame for each duplicate like this:
    Please login to see this link.

    2. She has found different ways to drag objects without the drag and drop object. She would like to know how to do it with duplicates so that only one of them would move.

    3. She knows that it is possible to get two objects to change places by destroying one and creating another. She would like to know how to do it with duplicates.

    Thank you for your help!

  • 1. I'm not sure what she means sorry.
    2. Use flags, e.g:

    User mouse is over Object
    -Turn flag 1 on

    User mouse is not over object
    ->Turn flag 1 off

    Object flag 1 is on
    +User clicks and holding left mouse button
    ->Set X position of object to Xmouse
    ->set Y position of object to Ymouse.

    3. I'm not sure what she means here, but duplicates need to have something that seperates them, easiest is to use flags like above or giving every duplicate object an unique alterable value. You can e.g.

    Start of frame
    ->spread value in Object

    Please login to see this link.
    Please login to see this link.|Please login to see this link.|Please login to see this link.

  • Thanks for your reply.

    My client asked me to create this thread because she doesn't know how to do the things she would like to do. The question was, how to do all of those things with duplicates. She knows that it is possible to give a number to each duplicate using spread value, but she doesn't know what else she should do. She thought she would tell more about what she would like to do. She used an image editing software (MS Paint) in the following pictures.

    1. My client meant that she would have duplicates that would look different.
    Please login to see this link.

    She knows that if she did that with duplicates, all of them would move. My client meant that only one of them would move:
    Please login to see this link.

    3. She means that she would have several duplicates of active A and several duplicates of active B. My client would like to know how to do it so that for example only an active A1 and B1 would change places with each other and the rest of them would stay where they would be:
    Please login to see this link.

  • If she spreads values or uses flags it works with duplicates.

    for instance i have two duplicates of Object1.

    Player mouse over over object1
    +Player clicks on object1
    ->Toggle flag 0

    Object1 flag0 is on
    ->Set x position to Xmouse
    ->Set y positon to Ymouse

    that will move one of the objects and not the other. But as Mobichan said, ask him/her what her end goal is and maybe someone can give a better example.

    Please login to see this link.
    Please login to see this link.|Please login to see this link.|Please login to see this link.

  • @ cherryblossom:
    feels similar to this old question on a matching objects game you also participated to:
    Please login to see this link.
    (don't know how I did remember this XD)

    with just the slight difference of using instances of same object instead of different objects + qualifiers
    and so having to "differentiate" instances in the code:

    Please login to see this attachment.

    You'll see the example is exactly the same save for the starting "create duplicates" section.
    I didn't use "spread value" here, but assigned values (letters) upon instance creation,
    it's about the same - just find the most suitable / comfortable way for your project

    a selection of my Fusion examples can be found Please login to see this link.

  • Hi, many thanks for your replies!

    My client thought she would tell more about what she would like to do. She would like to make a jigsaw puzzle. She would like to make also other kinds of games where the player could drag duplicates around. When she would make a jigsaw puzzle, at the beginning of the game she would have duplicates that would look different. After that, the player would drag them into the right places with the mouse one at a time.

    1. My client would like to know how to get the duplicates to look different from each other.

    2. We have told that she knows how to drag objects. zip2kx told that it works also with duplicates. Thank you for this information!

    3. She knows that it is possible to get an active to stick to one place by changing places with an invisible active. The question was, how to do that with duplicates?

    My client has read that thread and looked at that file again. She doesn't understand much about it. :D When she asked her previous care worker to write there, she noticed that she would have needed alterable values with it. She tried to ask about them in this thread but she didn't get many replies there: Please login to see this link.

    We have told that she would like to know how to use spread value. Does she need loops and alterable values also with this? She had found only a few tutorials on YouTube about loops and alterable values, but many of them have become private or unlisted, for example the tutorials from Sparckman and Snail On. Or can they still be watched somehow?

  • We have told that she would like to know how to use spread value.
    Say you have 4 Duplicates ( also called 'instance' of the same 'Object' if I remember correctly ):
    - Instance
    - Instance
    - Instance
    - Instance

    Eeach Instance has a set of AlterableValues ( basically numbers that you can set to the Instacnes and use for whateer ).
    If you create a code like this:
    - Start of frame
    -> 'Object' spread value in AlterableValueA '0'

    Each Instance will get assigned a different value assigned to AlterableValueA, accendign from 0:
    - Instance ( AltValA = 0 )
    - Instance ( AltValA = 1 )
    - Instance ( AltValA = 2 )
    - Instance ( AltValA = 3 )

    You can now reference the 'Objects' AltValA to differenciate between them ( for whatever reason ).
    Basically what we have done above here, is assign each Instance of the same Object an unique ID.

    1. My client would like to know how to get the duplicates to look different from each other.
    Example.
    Create 4 different Animation Frames for the Object described above ( make sure to set Animaton Speed to 0 ).
    Then do this code:
    - Start of frame
    -> Object set AnimationFrame to Objects AltValA

    After thiseach Instace displays a different picture:
    - Instance ( DIsplays AnimFrame#0 )
    - Instance ( DIsplays AnimFrame#1 )
    - Instance ( DIsplays AnimFrame#2 )
    - Instance ( DIsplays AnimFrame#3 )

    This is just one way to use the Instances unique "ID" to differenciate between them.

    3. She knows that it is possible to get an active to stick to one place by changing places with an invisible active. The question was, how to do that with duplicates?
    How bout you give it a shot and if your tuck I may cook up an example. It might not be so easy.

    How can i change username and display name?
    Please login to see this link.

  • Hi, thank you for your advice!

    She tried what you suggested but it went the opposite way as she would have wanted to:
    Please login to see this link.

    The number 1 is the first one and the others are duplicates of it. She would like to do it like in these images. The one on the left has been taken from the same Clickteam file and the one on the right has been copied from another image file:
    Please login to see this link.

    3. She knows that it is possible to get an active to stick to one place by changing places with an invisible active. The question was, how to do that with duplicates?
    How bout you give it a shot and if your tuck I may cook up an example. It might not be so easy.


    My client only knows this function: active 1 is overlapping with active 2 --> active 1 destroys --> active 2 creates at...

    She doesn't know how to do that with duplicates. She doesn't even know from where to look for it. :D

  • Is your first issue ( Image A1 ) that the pieces are in the wrong place?

    NOTE: Although it says 'Animation Frame' 1, 2,3 and 4 in the Animation editor ( in your image above ), 'Animation Frames' are actally 'zero based'. This means to correctl reference the 'Animation Frames' you have to reference them as 'Animation Frame' 0, 1,2 and 3

    After you have assigned an ID to each instance ( used 'spead value' ), and applied the code for changing AnimFrame, this should be the result
    - Instance with ID=0 ( Displays AnimFrame#0 )
    - Instance with ID=1 ( Displays AnimFrame#1 )
    - Instance with ID=2 ( Displays AnimFrame#2 )
    - Instance with ID=3 ( Displays AnimFrame#3 )

    Unerstanding the about, it should simply be a matter of determining if the Instances are created in the wrong place or in the wrong order, or you could also change the order of the 'Animation Frames' so that the pieces gets displayed correctl ( initially ).

    How can i change username and display name?
    Please login to see this link.

  • Is your first issue ( Image A1 ) that the pieces are in the wrong place?

    NOTE: Although it says 'Animation Frame' 1, 2,3 and 4 in the Animation editor ( in your image above ), 'Animation Frames' are actally 'zero based'. This means to correctl reference the 'Animation Frames' you have to reference them as 'Animation Frame' 0, 1,2 and 3

    After you have assigned an ID to each instance ( used 'spead value' ), and applied the code for changing AnimFrame, this should be the result
    - Instance with ID=0 ( Displays AnimFrame#0 )
    - Instance with ID=1 ( Displays AnimFrame#1 )
    - Instance with ID=2 ( Displays AnimFrame#2 )
    - Instance with ID=3 ( Displays AnimFrame#3 )

    Unerstanding the about, it should simply be a matter of determining if the Instances are created in the wrong place or in the wrong order, or you could also change the order of the 'Animation Frames' so that the pieces gets displayed correctl ( initially ).

    My client thought she could explain what her issue is. She had put the frames when she made the images that were linked in the first messages. Later she went into the Frame editor and clicked the active with the right button and selected: Duplicate. After that, she did what was suggested in this message:

    However, when she tested it this was the order (numbering is the same as in the Animation editor):

    Duplicate 1 Frame 4
    Duplicate 2 Frame 3
    Duplicate 3 Frame 2
    Duplicate 4 Frame 1

    She knows that she could rearrange the frames but it could be difficult if she had several duplicates. So, she would like to know if there was a function that would put the right frame to the right duplicate.
    Thank you in advance.

  • cherryblossom:

    values are spread "backwards" (latest object created in frame = lower value spread)
    and will always be assigned in the same way,
    so "rearranging" duplicates position in the frame editor (simply put the object showing frame 1 in the position you want frame 1 to show)
    is probably the quickest solution

    but true - it can be a messy/not very satisfactory one,
    so you can find other workarounds in the way you assign values (or directly animation frames) to objects

    i.e.

    start of frame
    + (instance) X position= xxx (your topleft instance X position)
    + (instance) Y position= yyy (your topleft instance Y position)
    >>> force animation frame to 0

    etc.

    in short, defining what makes that instance "unique" (in this case, its position)
    hard-coding the frame you want it to show (or the value you want to give it),
    and make so for each one of them

    There are better solutions (in the sense they don't require you to hard code each single instance)
    but are very dependant on your requirements/setup and usually imply some logic/math/creativity XD
    so there's no "overall blueprint" on how to do that other than some generic suggestions/hints
    on how you can assign a specific "something" in a specific instance,
    ...which you already know ;)

    a selection of my Fusion examples can be found Please login to see this link.

  • Hey!
    First of all, we have told that my client would like to make a jigsaw puzzle.

    Does this mean that there is no easy way to put frames in a different order?

    One of the things that we asked was how to get two duplicates to change places with each other. My client tried some things but they did not work. Can someone tell how to do it?:D

  • Hi again :)

    My client has tried some things and found out how to do some of the things that she would like to do. This is what she has so far:
    Please login to see this link.

    She tried to apply this:
    Please login to see this link.

    Sometimes when she tests the file, this happens. The one below should remain invisible:
    Please login to see this link.

    How could she fix it?

    My client would like to know how she could create duplicates in a random order in certain places like in this picture:
    Please login to see this link.

    She now knows how to get two duplicates to change places with each other. She would like to know how to do it so that when a player drops the duplicate in a wrong place, it would return to where it was before. She would like to add also a function to the game that when a player puts a duplicate in the right place, it would add a number to a counter. When the counter would equal a certain number, something would happen.

  • A very thorough and clear explanation of the issues,
    still,
    if you could upload the .mfa with the code you have so far,
    I'm sure we'll have easier time modifying it to match your needs,
    and maybe adding a few comments here and there to explain what we did and why

    if you can, this would help us helping and hopefully get to desired result :)

    a selection of my Fusion examples can be found Please login to see this link.

  • Thanks for your reply. We don't know how to upload files. We tried to follow the instructions in this thread: Please login to see this link.
    When we went to the file archive, we couldn't find a button for starting a new thread. Another option they suggested in that thread was to upload on this site: Please login to see this link. e=1
    However, that link doesn't work. Could someone tell us how to upload files?

  • Maybe its a reserved function for users with registered products. On your reply click "Go Advanced" scroll down and manage attachments and then upload the files. Else you could upload to onedrive/dropbox and post the public link.

Participate now!

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