olliraa's Forum Posts

  • 9 posts
  • Thanks for your patience I still can't figure it out. I now know how to make the event, but how do I make it work this way:

    1. Whenever enter is pressed the TextBox.Text is read into the global variable "input" (this already works)

    2. Also whenever enter is pressed the value of "input" is compared to the words in the array (I think I got this too...)

    3. If the input does not match with the array -"Syntax error" in one of the text objects.

    Sorry :/

  • Thanks, iIgot the content of the textbox updated to the variable, but cannot understand where do I get the Compare XYZ. Only way to get that option, is to add a completely new event with "System". How can I get that "under" the "key pressed" event?

    Could you please give me anothet hint on the later part?

    Thanks and sorry

  • I cannot get how I should build the events... I have an array with strings (one string/line). I want to test if the content of a text box (input by the player) can be found in the array after the player hits enter. If it matches, something happens, if not something else happens.

    I must have some kind of a total logic error in my head, this cannot be really complicated

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • That was it, thank you soo much

  • Hi. Awesome, that solved at least the "expanding array" problem. Thank you <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy" /> Still, there are like hundred times more stuff inside one cell than there should be? Screenshot below. There should be only one "who" in that cell right? Any clues, what might be the culprit here? <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" />

    cloud.uwasa.fi/index.php/s/B4R9eLOMrUecV6J

  • Hi. Thanks for the info <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile" /> Some problems still... It seems the array is constantly growing (computer responds very slowly...) and debug shows the txt-file has been read into the array tens and tens of times per one "cell"? What is the correct format for the txt-file? Just words and line breaks? Here are a couple of images:

    cloud.uwasa.fi/index.php/s/DgelNkvZoKMZTmF

    cloud.uwasa.fi/index.php/s/V3Hi3DtKb6ln7An

    Sorry, could net get any other way of posting the images to work :/

  • I want to make a "list" (array?) of words for a (really simple) game parser. If the word is found -> something happens. If not -> error. Found a tutorial for the actual loading part, but the format of the example txt-file is much more complex than mine. If I have a txt-file with one word/line and I want to read that file to an array. How do I do that? Here's a sample of the file contents:

    foo

    bar

    something

    useless

    stuff

    here

    My array would be very simple as you can see. Only one column.

    Running the latest personal version of C2.

    All help highly appreciated

  • Thank you, I'd never had figured that out myself. I guess I just have to try out more behaviors despite their names

  • Been pondering this a while now. I just want to make a basic enemy sprite, which just "patrols" between certain coordinates. It could be as simple as just "patrolling" horizontally between (150, 0) and (300, 0) for example continuously until collision happens with player sprite.. Or vertically the same way. I thought this would be very easy, but there's something wrong with my logic, I guess.

    I just could not figure this out myself :/ Any help highly appreciated Using the free version of Construct2.

    Thanks!

  • 9 posts