User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 18

Thread: Letter-individual checking

  1. #1
    No Products Registered

    Join Date
    Mar 2011
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Letter-individual checking

    Hi!

    I'm currently working on an educational game where the players will be given different tasks to complete.
    The current task is to type the alphabet in the correct order and then "correct" it with a specified button.

    The problem is, I do not know how to individually compare each letter to the alphabet, or the string I have created.
    The letters are to be individual values to be able to show the player which letter is in the right spot, and which is in the wrong spot.

    Would I need to ( at each type in of a character ) create a new string for each individual letter to then compare it to the complete string?

    Thank you in advance!

  2. #2
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)

    Re: Letter-individual checking

    You can use Mid$ to extract the specific letter from your correct answer string and then compare that to what letter the player has entered.

  3. #3
    No Products Registered

    Join Date
    Mar 2011
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Letter-individual checking

    Excuse me for asking, but how would I use this in MMF2?
    Both with the action/behaviour etc..

  4. #4
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Letter-individual checking

    Run a fastloop len(string) times

    On the loop set the selection from loopindex(loop) to loopindex(loop)+1
    And test for the selected text = the text you want

  5. #5
    No Products Registered

    Join Date
    Mar 2011
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Letter-individual checking

    Thanks for the help so far guys.
    I think I've come a little bit on the way there.
    But I do not know how to test the text against the string?

    What I've done so far ( I think ) is created the loop, ran it, but I have not tested the edited text to the string.

    The condition list is as follows for the loop:


    User clicks with left button on ""
    "Start loop "Len( String )" 29 times"
    "Set loop "Len( String )" index to LoopIndex(Len( String ))+1

    On loop "Len( String )"


    How should I proceed?

  6. #6
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jun 2006
    Location
    Darlington, UK
    Posts
    3,298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Letter-individual checking

    You don't need to set the loop index, it will count up automatically.

  7. #7
    No Products Registered

    Join Date
    Mar 2011
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Letter-individual checking

    Oh!

    Thanks!

    But I still need help with the comparing of the text box to the string.
    How should I do that?

    Note: I am a beginner, so I would appreciate it if you could explain thouroughly..
    Thank you!

  8. #8
    Clicker Multimedia Fusion 2SWF Export Module
    Jacob's Avatar
    Join Date
    Jul 2007
    Location
    Second pixel to the right
    Posts
    3,208
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Letter-individual checking

    You don't run a loop 29 times, you run a loop len(string) times, where string is the string you are using (for example, 'len(edittext$("Edit Box"))')

    And you can probably just use

    mid$(string,loopindex("loop"),1) = a, etc

  9. #9
    No Products Registered

    Join Date
    Mar 2011
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Letter-individual checking

    Okay, think I got it now.

    But, I still don't understand with what actions I am supposed to compare the text with the string?
    As I've said, I am a beginner, so you will need to explain the actions I need for it..

    Thank you, been a massive help!

  10. #10
    No Products Registered

    Join Date
    Mar 2011
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Letter-individual checking

    Hi again.

    Think I found the MID$ thing.

    I made it as a condition as follows:

    Compare two general values, and then entered the MID$ for both the edited text and the string.

    It looked like this for the string:
    Mid$( paragraph$( "String", 1), 0, 1)
    And like this for the text box:
    Mid$(Edittext$( "Textbox" ), 0, 1)

    But, the problem is, I don't know how to check exactly which letter is correct and which is false and then change the colour for them accordingly.

    Thank you guys!

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Individual Colours
    By Game_Master in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 30th March 2012, 06:38 PM
  2. are you an individual or a company?
    By Bigfoot in forum iOS Export Module Version 2.0
    Replies: 13
    Last Post: 14th January 2012, 12:05 PM
  3. Individual Health
    By shoyu95 in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 1st March 2011, 03:01 AM
  4. Individual sensors for enemies?
    By Oreo in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 17th February 2009, 01:16 AM
  5. Letter-by-letter text - next line if word too long
    By DistantJ in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 5th February 2008, 06:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •