R0J0hound's Forum Posts

  • Make the wait the top action.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Global text foo="123456"

    System: compare variable foo=str(int(foo))

  • A few ideas:

    One would be to check if each character is a digit. You can extract indavidual characters with the mid() expression, and since you want to check each you'll want to use a loop. Use the Len() expression to get the number of characters. Next you either use a condition per digit or maybe use the find() expression to find the current character in some text of all the digits. Finally you could add 1 to a variable every time the character is a digit, then after the loop see if that variable is the same as the length of text.

    Another way would be to convert the text to an int then back to text and compare it with the original text.

  • When there's an error that causes a black screen the error is typically displayed on the browser's console. Seeing what the error is would be helpful to pinpoint what's causing it.

    It looks like google chrome can be used to debug and see the error console of a xdk/Cordova app running on a phone. I saw a tutorial in the tutorials section and another tutorial just with a Google search.

  • Dos box disables it with a winapi function and other games may do that too, but as I said it's not something that can be done from JavaScript.

  • I've always just manually disabled the shortcut from control panel.

    I guess there is a way to do it programmically using some Windows specific code, but that can't be done with JavaScript in a browser.

    It could possibly be done from an addon for a nwjs, but that doesn't seem like a very simple thing to do.

  • I think it's in the manual but you can by index

    Sprite.imagepointX(1)

    Or by name

    Sprite.imagepointX("myImagepoint")

  • The button object has its own "on clicked" condition. Maybe that's what you used before?

  • Yeah, it's relative to the top left of the canvas.

  • I'm pretty sure you could set "force own texture" on a layer in Construct Classic. Maybe that would help?

    It causes the effects of the objects on that layer to only affect that layer.

  • Some ideas here for the second video:

  • Like from the end?

    set text to left(text, len(text)-1)

  • It's a third party plugin and it draws to itself. Maybe it's not big enough?

  • Something like this works for me. I don't know how different it is from what you're using.

    start of layout
       local number value=0
       repeat 10 times
          wait 0.1*loopindex seconds
    	  add 10 to value
    	  sprite: set effect "tint" parameter 0 to value[/code:1mvlsp95]
    A variable is used instead of using loopindex below the wait because the wait action doesn't save the value of loopindex.
  • Add the function and browser objects to your project. Add a function and call it "on alt pressed". Next add a "on start of layout" event and add a "browser->execute javascript" action with this:

    "document.addEventListener('keydown', function(e){if(e.altKey)c2_callFunction('on alt pressed',[]);});"[/code:2z17k7e3]