How do I use BBcode within the Set Text action?

  • Hi,

    When I have text or a Sprite Font object, I can easily use bbcode when I adapt the text in the properties bar. However, when setting text to something new or global variables in an action following on a condition, BB code cannot be added. Is there something I'm doing wrong or some way to work around this?

    I tried it these ways: set text to "[background=#000000]USE "&ITEM_NAME&" WITH...[/background]" (nothing shows up here as a background)

    as well as [background=#000000]"USE "&ITEM_NAME&" WITH..."[/background] (here, the set text action doesn't accept the BB code because of the ''['' brackets. Thank you in advance.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • "[background=#000000]USE "&ITEM_NAME&" WITH...[/background]" - this is correct, I tested and it's working, I got text on black background.

    If it doesn't work for you, please post a screenshot of your events.

  • Hi, thanks for your reply. I tested it in a new project and it works fine there. In my own project though, it doesn't for some reason. I tried deleting the text effects (Pulse) that you can see on the left as well to try it out, but nothing changes. I'm not sure what could cause such a conflict.

  • So what happens exactly? The CursorText object appears with "Use item with.." text, but no background? Or you don't see the text at all?

  • Ye the text appears with the right text color and the pulse effect active, but no background color.

  • Does it say "USE ITEM WITH..." or does it say "[background=#000000]USE ..."?

    Can you copy-paste this object into a new project, test and if it has the same issue, share this project file?

  • Ugh I figured it out. There was a random copy later on in my event sheet. I feel like a tired tool. Anyway, thanks for your help man.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)