Save List.SelectedText as variable with quotation marks

0 favourites
  • 3 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • Hi folks.

    So, I have this dropdown list with some variables in it. Let's say Rock, Metal and Pop. I want to save the selected object in a variable that I can use as a tag.

    In other words: If I click on Rock, the variable should be set to "Rock" and not Rock. That way, if I want to use the "Rock" tag in something, I can just input the name of the variable, right?

    Right now I have When List clicked, set Variable to List.SelectedText

    This saves the name of the text, but without the quotation marks. If I make it ""&List.SelectedText&"" it makes no difference.

    So, how can I save this List.SelectedText with quotation marks to a variable?

    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
  • If I click on Rock, the variable should be set to "Rock" and not Rock....

    So, how can I save this List.SelectedText with quotation marks to a variable?

    """"&List.SelectedText&""""[/code:3aqplhj2]
    
    but I usually use an additional  variable for quotation marks
    
    [img="http://lookpic.com/O/i2/349/9pIKGk6f.png"]
    then I can write
    [code:3aqplhj2]qM&List.SelectedText&qM[/code:3aqplhj2]
    
    [img="http://lookpic.com/O/i2/762/t4QDSmmU.png"]
    
    
    

    if I want to use the "Rock" tag in something, I can just input the name of the variable, right?

    in C2 you don't need quotation marks for tags if you use variable...

  • Okay great, thanks!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)