Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder Taro's Avatar
    Join Date
    Oct 2011
    Location
    Geraldton, Ontario
    Posts
    155
    Thanks
    1
    Thanked 1 Time in 1 Post

    Question GML script: censoring password input code help

    Hello,

    I've been working on Gamemaker 8.0 Lite and am trying to find out how to mask the password for my computer application, using GML (from the derivative language, C). This is the code so far:

    Code:
    aa = show_menu('Source',-1)
    
    if aa = 0
    {
    dfg = get_string("Type in the password.","")
    
    if dfg = "jubjub"
    
    {
    
    show_message ("Access allowed.")
    
    }
    
    else
    {
    sound_play(access_denied)
    
    show_message ("Password is incorrect. Access denied.")
    }
    }
    When I type the password, the actual letters show, and not something like the stars- *. So is there a code that can mask "jubjub"? I've been trying something like:

    Code:
    j = (*);

    Also note that this script is activated on the "left pressed" object function if you need to know. Below is what the problem looks like in my application:
    Attached Thumbnails Attached Thumbnails GML script: censoring password input code help-image.png  
    Last edited by Taro; 02-12-2012 at 06:37 PM. Reason: forgot something

  • #2
    New Coder
    Join Date
    Aug 2007
    Posts
    59
    Thanks
    3
    Thanked 1 Time in 1 Post
    I never used gamemaker so this may not be possible. What I would do is detect key hits instead of the text. For most languages detecting key's inputs decimal (acsii) values (1-128 or 256 depending) which can be converted to char characters. For each valid detection you could ouput * on the screen.

  • #3
    Regular Coder Taro's Avatar
    Join Date
    Oct 2011
    Location
    Geraldton, Ontario
    Posts
    155
    Thanks
    1
    Thanked 1 Time in 1 Post
    Quote Originally Posted by nojtb View Post
    I never used gamemaker so this may not be possible. What I would do is detect key hits instead of the text. For most languages detecting key's inputs decimal (acsii) values (1-128 or 256 depending) which can be converted to char characters. For each valid detection you could ouput * on the screen.
    That is a probable suggestion nojtb. The GML editor looks for errors in my script; I also may need to look back at the C programming language as well as for the input/output key-stroke function.


  •  

    Tags for this Thread

    Posting Permissions

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