Killax11's Forum Posts

  • 6 posts
  • Thank you for your Help.

    I found another Thread(https://www.construct.net/de/forum/construct-2/how-do-i-18/how-do-i-compare-text-input-wi-130709)

    Now I use "trim" with every access to the array and it seems to work. In the debugger it was not visible. Maybe throught the textfile the Linebreak was transfered in the array.

    Such a nasty thing :-)

  • I can not detect any errors and it is possible to compare two strings. However, it is a bad idea to filter the textbox after the UID. Better use an instance variable. Have you checked in the debugger, if the array values at 0, 0 are really the same?

    Ok, i will rebuild to instance ID later. For the moment I test some textboxes with instance ID.

    I checked it on an empty project by setting manually the values into the array(names with"") and the comparision seem to work. Maybe there is somewhere a conversion problem with reading this data with ajax. (Has somebody an idea?)

    I read the data into a big array 100x3x1 and random pick the values into the sum array.

    The Data in the arrays seems to be identical. For Test purpouse is only the first filled.

  • Maybe you should read some totorials regarding arrays. You will find there all Informations you need.

    When you plan only a few objcts:

    scirra.com/tutorials/872/inventory-without-function-array

    When you plan a lot of objects:

    scirra.com/tutorials/614/array-based-inventory

  • No, you can create image points in the Image editor and spawn the objects on this image point. You can put all items in one sprite, when you want.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Maybe you can play an animation and move the character to the ousite from the layout, when the sprite is touched, and move the other character to this position. Or you destroy and create the character new at the last position. Or you switch the animation frame, when all in one sprite. Then you need to detect, which character is or is not on screen, that you can set the animation or move the character when he hit the sprite.

    The other part depends on how you progammed the game.

    You can set the objects to collision disabled, when charakter a is not on screen.

  • Hi guys,

    I'm working on a game, where i want to compare a user text, which i write in an array, with another array.

    It should look like:

    Original(Sum) Array which get random Data from big Array every play round:

    6x3x1

    Text,Numer,Number

    Text,Numer,Number

    Text,Numer,Number

    Text,Numer,Number

    Text,Numer,Number

    Text,Numer,Number

    The user array(Namesanswer) has the same size, but get data from textboxes. In this array is the 3. height not used. The transfer into the array works fine.

    Now I want to compare the 1. and 2. height of the both arrays and if the answer is right, then the text/numbers gets green, if not, red. The Numbers works fine, but the comparison of the text fails.

    Everything I tried in construct lead to the result, that the comparison is every time wrong. This is my attempt to solve the problem. Maybe someone can say me, what I do wrong.

    Surely I could transfer first the values into variables, but is there no way to compare strings in arrays, when I know, where they are located?

  • 6 posts