Estecka's Forum Posts

  • trueicecold

    What's wrong in your example is that you didn't use echapped doublequotes. ( "" )

    I put href= alone in your textbox and got a match although it shouldn't work.

    In your case construct is actually testing for the regex href= , not the regex href=".+" which you should have written href="".+""

    However, it would work fine with href='.+'

  • I don't think so, a single double double-quote is enough to make the regex not match the string, so beside with far-fetched combinations of variables, which would break the whole point of using variables, I don't see how I could stealthily include a double-quote in there.

    Any moderator, I'm starting to wonder if it wouldn't be worth moving this into the bug section ?

  • 99Instances2Go

    Yes, I know that, that's what I've been doing up there: typing class=""x"" so it understands class="x", but yet it still only works half the times.

  • I think I located the problem, but that doesn't come with a solution yet.

    It has to do with the fact I'm using " within the regex.

    Usually you can include a " within a string by typing it "", that's what I did with the event and it works there. Then I just copy-pasted the regex into the variable. The variable does work if I shorten my regex to a bit without "", but as soon as I bring it back it stops working.

  • So this is pretty simple:

    I have an event that test if a text matches a regex, so far it does nothing but telling me whether it does and it works prefectly, the text matches as intended.

    Then, because I plan to reuse the same Regex several times in the code, I decide instead to put it into a variable and call the variable.

    And as simple as this, it doesn't work anymore ?!

    The code is quasi-literally limited to this event, so I beside double-checking the spelling, I really have no idea where to look for a mistake. :/

    Update:

    It has to do with the fact I'm using " within the regex.

    Usually you can include a " within a string by typing it "", that's what I did with the event and it works there. Then I just copy-pasted the regex into the variable. The variable does work if I shorten my regex to a bit without "", but as soon as I bring it back it stops working.

  • Great! I ever wanted to insert projects into other projects in order to create a modular portfolio, thanks !

    This project aside, I seem to be unable to retrieve the innerHTML of a cross-domain origin iFrame... any way I can go around this ?

  • No one?

  • So, I've been trying to use breakpoints to figure out various things in my code, but quite often, the part I want to inspect requires that the mouse cursor is hovering a certain item. When I am in the debug panel clicking "next" or "continue" my mouse cannot be hovering said item, and said part of the code is skipped.

    Is their a way to trigger a "step" using keyboard shortcuts ? So I can leave my mouse cursor where it ought to be when the code requires it ?

  • So, is there really nothing to know on that matter ?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So, I just attempted to name one of my animations "ActorIdle-90", but upon validation, construct promptly removed the minus caracter without notice.

    I was surprised from this restriction and tried out the risky thing: I opened the project file into a text editor, manually renamed the animation to include the minus, and accordingly renamed the project folder path containing the animation frames.

    After reopening the project, no error was shown. The animation was properly renamed, properly showed in the editor, and after updating my event sheet, it was properly playing in-game. It all seemt like there was no problem using this caracter in the animation name.

    What's the reason behind the removal of special caracters? Are there some nasty side-effect I should be aware of if I continue down this path ?

  • So if I understand, you are facing the error that says: "Cannot create an instance of the object type 'sprite': there are no instances of this object in the project.", but you're not willing to place an original instance anywhere in your level ?

    What I have done on my side is creating a "garbage" level, that has no use in the game itself, wherein I place one instance of every single object type.

    You only need to create one object in the whole project, not one per layout.

  • If I write, let's say " Sprite(5).X " in an expression, what does the (5) do ?

    I was about sure it would pick the sprite with UID 5, but everything I've done proves it doesn't.

    Since construct isn't throwing a syntax error at me, I assume it does mean something else, but what?

    And then, is there a way to pick an UID directly in written expressions instead of events ?

  • => "A single trigger can be run multiple times per tick"

    Oh, I never actually considered that. I think I'm starting to see the nuance here.

    Thanks for the information.

  • Yeah, I've checked the manual and understand how these triggers are supposed to work, but I still don't understand is why they need to work this way.

    I mean, code not executed in writing order, I'm falling off my basics here. Am I the only one to question this?

  • Wait...

    But then when are triggers executed in the code? In-between ticks? How do you control that ?

    I don't understand why. What makes it so it was intended not to work the same way as: ?