I need help with textbox collision

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!

    So I've got this game I'm working on with text you can drag and drop
    Many of the ~50 words have multiple strings that get randomly picked at the start of the game
    The only problem is that the hitbox of the text expands way beyond the actual text, which makes moving the different words painful.
    My question is how can I convert the strings to active objects once they are loaded in the game? Alternatively, how can I get it so the text hitbox is reduced to only the shrunken text box?

    A user on Discord said to "Use Active System Box instead, [as] you can resize it". They also said, "If you need to resize it to the text size, you would probably need Calculate Text Rect object as well".
    Is this the best method? If so, I need additional help. My project file is attached.Please login to see this attachment.

  • Hi,
    the Static Text box is resizable also, I made a quick example, I used a fixed width font (Lucida Console) there a a few you could use to make life easier,
    Set alterable strings with the words you want to use, once you work out the width of a letter in your application then just try different multipliers until
    you find the right one.Please login to see this attachment.

  • Thank you, but I seem to be getting a graphical glitch upon overlapping magnets where the text will merge into the other. It's possible to make an event that always restores the text from the original string, but then the layering gets all out of whack. Is there an easy way to fix this issue? Please use the attached .mfa to see what I mean. Cheers.

    Please login to see this attachment.

  • hmm, thats a strange problem, if a letter overlapping matches in the box under it it copies the text over, must be
    a bug with static text box, maybe try the Active system box, you can use the same method to resize it.
    you might want to add an action saying when mouse over box-order-bring to front, this would keep the moving text always visible.

    also, try looking here Please login to see this link.
    you could reduce those 26 lines of code to 1, :)

Participate now!

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