mindfaQ's Recent Forum Activity

  • some event that starts your game:

    gametime_start = time

    some event that ends your game and assigns the score:

    set score = 1000 - int(time - gametime_start)

  • Actually you only need to wait 1 tick for Construct 2 to know the correct size.

    What you could do is display the text off screen, get the measurements and only when you have them display the text on screen with your fitting background. 1 tick delay normally should not be very noticable.

  • sprite is on screen: number_of_sprites = sprite.pickedcount

  • Wouldn't it be better to shoot in an interval, with the help of the timer behavior.

    on right click:

    create bullet

    start timer "gunfire" regular for cooldown seconds

    on right mouse button released:

    stop timer "gunfire"

    on timer "gunfire"

    create bullet

    With the cooldown variable you could change, how much time it takes between shoots. Distance traveled seems like a weird choice to me in most situations. If the bullet flies at constant speed, you can calculate the time it takes to travel 600 anyway.

    Problem with your event is: on right click only triggers once, when you press the button, not when you hold it down.

  • 1) Save your equation to a string (equation = "45*31-187")

    2) add the Browser object to your project

    3) set the value of your result variable to: browser.execjs("eval("&equation&")")

    result now holds the the result of your equation.

    Generating random integers from x to y is done with int(random(x,y+1))

    The rest should be straight forward and only limited to your creativity, no?

  • If you can detect in an event when a video ends, you could just do:

    on video finished playing:

    add 1 to position

    call "run" ()

    If you have no indicator when a video finishes, but the user also has no control over the video, you could start a timer with the length of the video + some small leeway, and on this timer, you do the same actions above.

    If you want the user to be able to skip the video, ofc you need to add that functionality, too (on left click and video running -> stop video, position +1, run, something likw that)

  • "mont or monta i cant get correctly the value "mountain" " -> because you need at least 75% of the letters of the target word.

  • 1) Monospaced font (http://www.slant.co/topics/67/~what-are ... ming-fonts), can also use a spritefont, but all letters should inherit the same space (if retro is what you are going for, you probably want it to be pixelish, not smooth)

    2) Black Screen background

    3) Interpreter for commands if needed

    4) Limit input to an arbitrary subset of characters if necessary

  • Levenshtein distance is the number of operations/edits you need to do, to change one word into the other. The regularly used weighting is:

    1 for substitution (example: 1 wrong letter typed)

    1 for deletion (example: 1 letter too much)

    1 for addition (example: 1 letter missing)

    So you could say you allow 1 typo in the word, then for red stuff like this would be allowed:

    reed, ret, rad, rwd, rd, ...

    Of course you could make it reliant on word lenght, so for example forbid typos in short words, but accept one or two in longer words.

    Word suggestion is something different and would use a dictionary, preferably one which knows the frequency of words in common usage, to suggest the most frequently used word(s) that begin with the typed letters.

    Would it not be a problem in your game, if autocompletion is too strong? (it could get weird for the players if all they do is write out words half-way and then the next task already comes up)

  • https://copy.com/uYqaoQi11F4wquXg

    I still dont really get what you want to achieve with this. If you want to compensate for typos, then it would be better to employ levenshtein distance.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Nvm, understood it... I think.

    https://copy.com/EjoQsnxgYyJL1DYK

    like this maybe.

    it ignores upper case letters, and for each lower case letter it tests whether it matches or not, ignoring order. Then you get a number of matches and non-matches.

  • When you load the array from json, it assumes all information to be in string format. Convert to integer or float with the expression delivered by the previous posters.

    And don't forget to use curindex in the loop instead of 0 for the x index, when you set the values.

mindfaQ's avatar

mindfaQ

Member since 12 Oct, 2013

None one is following mindfaQ yet!

Trophy Case

  • 11-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

13/44
How to earn trophies