dop2000's Forum Posts

  • Yes, you can do something like this:

    Set variable badWordFound to 0
    Array For each element X
     Find(Textbox.text, Array.CurValue)>=0 Set badWordFound to 1
    
  • No, find() returns the position of substring if found, or -1 (minus 1) if not found. That's why you check if it's equal or greater than 0.

    find("abcdef", "abc") will return 0

    find("abcdef", "cd") will return 2

    find("abcdef", "xyz") will return -1

  • In this case you need to use find() expression, see my previous comment.

  • You can set your array width to 0 in array properties and do this:

    On start of layout
     Array is empty -> Ajax request file ....
    
    AJAX on completed -> Array load from AJAX.LastData
    

    This way the data will only be loaded once. Also, make sure that your Array object is set as Global.

  • What do you mean by "highlight"?

    If you want to test if a string contains substring 'or', you need to use find() expression:

    System Compare two values -> find(textinput1.text, "or") greater or equal 0 : perform action

  • This can be a wrong version of the plugin, or you might have installed it incorrectly. I found the only working link for this plugin here:

    construct.net/forum/construct-2/general-discussion-17/request-sine-action-reset-58064/page-2

    Make sure to extract the files to this directory:

    \Construct2\exporters\html5\behaviors\sinx

    If it doesn't help, you can try manually removing all mentions of this plugin from your project files.

  • Do this:

    .

    I meant you selected "Runtime: Construct 3" in project properties. This is a new experimental runtime engine, and it's still in development. Many things still not working in it, including the debug mode.

  • I haven't tried it, but you can make the border of the box solid. (Add an invisible solid rectangular sprites to each side, pin everything together)

    When there is no user input, pin the ball to the box. When user presses a key to move the ball, unpin it and let the 8-behavior take care of it.

  • Set s to InputBox.text

    Set s to uppercase(left(s,1)) & right(s, len(s)-1)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You need to do this in "On start of the layout" event. Currently you re-pin these sprites on every tick, that's why it's not working.

    Also, some of your ball sprites have collisions disabled and overlapping check will not work with them.

    Finally, why are you using Construct 3 runtime for this game? It doesn't even support debug mode.

  • Yes, create an event "System -> Compare two values -> timescale not equal 0"

  • "On start of layout" is triggered only once and lasts one tick. You need a repeating event, like "One every tick" or "Every X seconds".

  • find() expression searches for a substring in a string and returns its position if found, or -1 if not. For example find("abcdef", "def") should return 3.

    You can use other text expressions - left(), mid() etc.

    See manual:

    scirra.com/manual/126/system-expressions

  • If you have several layouts that use the same event sheet, you can try LayoutName expression:

    System -> Compare two values -> layoutName="whatever"

  • This JSON has a complex structure, you can't load it into an array/dictionary, even if you fix the header format.

    There are several addons for Construct 2 that allow to work with complex JSON, but I don't know if any of them were ported to C3.