LoobyLoo's Forum Posts

  • That's working fine? Because each time the pick all would cancel the initial condition. Maybe you didn't notice because all the actions are the same.

    Yes it is wokring fine, I am toggling text colors, displaying only the most recently clicked text as active. The active text should have a color other than rgbEx(0,0,0), while the rest should be rgbEx(0,0,0).

  • The above code is working just fine. However, I'm wondering how I can make it more efficient. I'm still learning about loops, and I'm curious if I can improve its efficiency using a loop! I dont know how to start, Any suggestions?

  • My requirement is to change the font size of the text in real-time, which is why I need that logic. However, the issue is that the text becomes blurry.

  • Yes, you can use TextObject.TextHeight/TextWidth to get the size of the actual text and set the size of the object from there.

    Hi, GeoffB, I just have one doubt.

    The logic works great; however, when I use the TextObject.TextHeight/TextWidth logic, the font becomes blurry, especially when the font size is big, like in my case with a size of 60. Is there any way to make it crisp? Or is it handled by the browser, so it's random, and we can't really do much about it?, Or is it a bug in C3?

    I have attached an image to demonstrate the issue more prominently

    And here the C3p

  • I'm not sure what your intentions are with BBox, but if you want to check if a Sprite is overlapping any object, just use Sprite: Is Overlapping -> Object.

    Many object types don't have On Collision or Is Overlapping, but the Sprite object does and can always detect if it's overlapping with other objects.

    There's no direct way of checking if Text is overlapping something (although it's more-or-less the same thing), but if you really want to, you can create a new Sprite object and add it to a container for the Text Object. Set them to be the same size, and then use that Sprite object to detect collisions.

    Thank you, it works. Also, thanks for the Container part; the tricks you gave have definitely enabled many things for me further.

    Here, I'm just curious if I can have the same question but for text, meaning, how can I check if two text objects are overlapping using BBox?

    Here is the original suggestion to solve this using BBox.

  • Thank you so much.

  • First of all, I apologize, as this question has been asked in the community before, and the answer to this question is as follows:

    "Text.BBoxLeft < Sprite.BBoxRight && Text.BBoxRight > Sprite.BBoxLeft"

    However, I am unable to make it work. My requirement is simple: I just want to check whether a text and a sprite are overlapping to each other or not. If they are, then I want to perform certain actions.

  • Is there a way to automatically adjust the size of a 'text box' based on the amount of text it contains, so that it shows all the text, and obviously on runtime.

    Tagged:

  • It was suggested to add a font to the Fonts folder to use it in the project where it's not installed. However, since I have used many local fonts in my game, do I need to manually check and find the corresponding font from the Windows font folder or search for it online? Then, place it in the Construct font folder and change the local font selection to use the font from the Construct font folder? Is there an easier way to accomplish this?

  • You can use "Pick all" condition. Notice how the events are nested:

    This is exactly I was looking for, Thanks ☺️

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I have four buttons (which is actaully a sprite) in a row, all of the same instance. Each button has two animation frames: frame 0 for unclicked state and frame 1 for clicked state. My requirement is that when a user clicks on a button, its frame should change to 1, and all other buttons should change their frames to 0. In other words, only the latest clicked button should have frame 1, while the rest should have frame 0. How can I achieve this?

    Tagged: