korbaach's Forum Posts

  • if you have image "1.png"

    or

    "something"&PNG&".png" .........something1.png

  • ok..try diffrent way..rename sounds..

    а->frame with picture of "a" .(ogg&m4a)

    б->frame with picture of "б"

    .

    .

    ..so if "д" is on frame 20..rename sound д to 20(ogg&m4a)

    then you can use Audio play str(SpriteText.AnimationFrame)

  • If right arrow button is pressed = character animation to "walking".

    If right arrow button is pressed - animation "walking" starts over and over from the beginning(frame 0)

    try: On Key pressed..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ... i want the game to ask you a question based off of a dictionary (The key is the answer and the value is the statement or question). How can I get it to pick a random key in a dictionary to make this work...?

    ..

    Try this input .. a variable and use..Choose(1,2,3,4)

    and then you have several condition such as IF variable value at say 3 then use the action to pull that dictionary value.

    I prefer to code a random variable number generator and then putting a condition for each value.

    and..if you have 1000 question...you'll have 1000 conditions....

    you want to use Dictionary ..you need to write keys and values differently...

    keys should look like :"1Question";"2Question"...."1000Question"...

    then if you have variable"Rnd"=5or27or333 ..you can get Rnd&"Question" key

    Second...you need to put your Question&Answer in Value..Use Separator between them...

    (i use # in example)

    then use tokenat to pull out Question&Answer...

    ..and finally..if you don't want to repeat questions..use Array for random values...

    RndDictionary.capx

  • ..if you use just one "testBtn" Sprite object (5 frames&animation speed 0)..

    you can compare frame and QuizAnswer variable...

    Random5.capx

  • Just interesting what is "g" in string RegexSearch(SpriteCharacters, Letter, "g")?

    Why not "b" or other letter?

    in this particular case..i think ..you can replace "g" with "i" or "m"..and it would not affect the code

    like zenox98 reference "g" is Modifier in Regular expression...

    Just search net and forum for Regular expression

  • I want to do this:

    After write some text in textbox and click button

    letters appears and sound with respective sound..

    I guess... you need some delay ("typing effect") when you create letter sprites..

    so..you can't use loop(actually...never mind)...

    try this one:

    LetterSpriteSound.capx

  • 1 - Click a button to select all the text.

    2 - Another button to copy the selected text

    If you mean...copy to clipboard

    like:

    First you need custom ID for Text Box

    then ..you can write something like*:

    Browser Execute Javascript-

    [quote:2ks4ml4r]"document.getElementById(""myText"").select();document.execCommand('copy');"

    now you can paste selection to text file on your computer..or..

    CopyText.capx

    *=probably not the best code..I tested this only in last Chrome..just search net for "javascript&copy to clipboard"....

  • use frames..not sprite objects...

    or..you can always build a custom spritefont...

    RegexFrames+SpriteFont.capx

  • so...here is my attempt..

    Mystic Square2.capx

    But... really do not like While loop...in "swapMix" function...

    any advice?!

  • try:

  • Thank you.. blackhornet & R0J0hound !

    Now... when you say solution..I see that it is only logical solution...

    yes.. ..I also see Harvey

  • It can not just be random as it has been proven that 1/2 the configurations are unsolvable.

    blackhornet Thanks man!....yes..I generating random frames...

    ..do you have some advice, how to do it properly?

    ..I know I can write frames in array...but surely, not every possible combination...