rhettjevans's Forum Posts

  • 3 posts
  • Ah you're right! I guess I shouldn't have assumed the quotes would become part of the string. Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I should have clarified: you're right that when I set up the Global variable the first time I can include a hashtag in the string, but when I try to use the "Set Value" action, I cannot change the global variable string to a string with a hashtag without putting quotes around it. See the image here.

  • I have a string Global Variable called help_url that looks like this "https://www.example.com/site#1" (the exact site URL changes during gameplay). Construct forces me to put double quotes around it since it has a # character.

    Users are supposed to be able to click on a UI button and then it takes them to the help_url in a new window. Now I am setting up the Browser action for when a user clicks on the button, which means I have to strip out those double quotes, so I'm trying to use:

    RegexReplace(help_url,"/["']/","","")

    But Construct rejects this because it wants me to close the double quoted string in the REPLACE spot. I'm not great at REGEX, but I've also tried approaching from a different angle with my URL using

    RegexMatchAt(help_url, "/[a-zA-Z0-9]*-[a-zA-Z0-9]*/", "", 0)

    But that doesn't work either (the page opens to about:blank). Can anyone tell me what I'm doing wrong or suggest a better way?

  • 3 posts