How do I select random text in dropdown?

0 favourites
  • 2 posts
From the Asset Store
Project File of my C3 Tutorial Customized DropDown List
  • Hey C3 world.

    I have one sprite (key_gen) that has several copies (id=1, 2, 3) and all have an instance variable of "codes" (8 characters of random numbers and letters) and "encryption_type" (values of 16, 32, 64...etc).

    key_gen.codes

    key_gen.encryption_type

    The dropdown list is populated by checking all the sprites to see if "codes" is blank and if the variable isn't, an entry is made of the string of characters.

    However, it escapes me on how to configure the dropdown so that when one of the codes is selected, the codes and encryption values for that sprite are copied to a different sprite:

    ssh_key.codes

    ssh_key.encryption_type

    Since the values are random, it's hard to set "text selected". The answer might be "not possible" which is fine but had to exhaust all avenues for the question before trying a different avenue. Thanks in advance.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You should be able to do this by picking key_gen instance:

    List On Selection Changed
    key_gen Compare instance variable codes=List.SelectedText
    ... ssh_key set codes to key_gen.codes
    ... ssh_key set encryption_type to key_gen.encryption_type
    
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)