User Tag List

Results 1 to 3 of 3

Thread: Is there any way to make an "autofill" function in a text box?

  1. #1
    Clicker Fusion 2.5 (Steam)

    Join Date
    Oct 2020
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Is there any way to make an "autofill" function in a text box?

    Currently working on a university assignment where I'm making a game in which I need the player to be able to 'search' for certain answers on google within the game. I decided the best way to do this is to make one word in another part of the game bold as to hint to search for that, and from there they can navigate to the 'pages' related to it.

    For example, a player needs to look up "What's the best APPLE?" they would start typing "apple" into a pseudo google/search page to which would come up with other queries including the term the player is seeking. The other queries will just be flavour text/filling in for other sections in which the search functions needed.

    Anybody got any ideas of how I'd go about making a text box that the player can use & live detect what's being typed? If not, any other suggestions of how you'd go about this kinda idea given the context.

    Thanks c:

  2. #2
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,664
    Mentioned
    133 Post(s)
    Tagged
    0 Thread(s)
    I've done something related myself just recently, actually. I don't think it's exactly what you need, but I built a little "phrase menu" tool for myself. As I type, it narrows down a list of phrases that I can select (the top bit with "omni" in it is the edit box, and the rest is a List Object, which is separate):



    Below is the key code for it. I've included the bottom 2 events for completeness' sake, but you can probably ignore them. Just focus on the top event (#168) and it'll hopefully give you enough to go on for your needs. Basically, I use an "Edit Box" object and an Active Object (I've changed the icons for both so have marked them on the screenshot to avoid confusion) and the "Compare 2 general values" condition:



    So, event #168 continually compares (a) what the user has typed with (b) an alterable string called previousSearchTerm to see if they're different. When the MFA first runs, previousSearchTerm is empty, which means that as soon as the user types anything, this event triggers. Whenever it triggers, it saves the current contents of the editbox into previousSearchTerm, and does something (in my case, it runs some loops to cull a list of items; in your case you could pop up your flavour text or whatever it is you need to do). Since we've saved the edit box contents (a) into previousSearchTerm (b), they are now the same. But any time the user types another key or presses backspace, (a) and (b) will be different again, and the event will trigger again.

    Hopefully I was clear enough to be of help.


  3. #3
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2014
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could you post an example please? looking for this function too.

Similar Threads

  1. Can not make "headshot" function
    By 3DBBQ in forum Fusion 2.5
    Replies: 2
    Last Post: 2nd October 2017, 01:22 PM
  2. Replies: 2
    Last Post: 12th April 2016, 08:42 PM
  3. Replies: 6
    Last Post: 18th August 2015, 02:23 AM
  4. "Load text file" from "The Edit Object" BUG?
    By MOBii in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 19th December 2013, 05:43 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
  •