Can I test if an attribute is "blank"?

stefdelecstefdelec Member, PRO Posts: 146

Hi,

If attribute 1 is
then...?

How do I trigger a behavior if a value is blank/empty?

Regards,

Stéphane.

Comments

  • SocksSocks London, UK.Member Posts: 12,822

    @stefdelec said:
    How do I trigger a behavior if a value is blank/empty?

    What do you mean by 'blank' or 'empty', do you mean 0 (zero) ?

  • Thunder_ChildThunder_Child Member Posts: 2,343

    I usually add a text display...temporarily on my game scene to know wether that Boolean or what ever game level attribute is turning on/off or not.

  • stefdelecstefdelec Member, PRO Posts: 146

    Blank empty.
    (tks socks to answering all my answer)

  • SocksSocks London, UK.Member Posts: 12,822
    edited August 2015

    @stefdelec said:
    Blank empty.

    What do you mean by "trigger a behavior if a value is blank/empty?"

    You are saying if something is true (if the value is empty/blank) then do some action, when GameSalad looks at this attribute to check whether it is blank/empty what would GameSalad be looking for ? Would GameSalad be looking for a 0 (zero) ? Is that what you mean by blank/empty ?

  • stefdelecstefdelec Member, PRO Posts: 146

    Nop, if attribute is a text, and this attribute has nothing attributed=> then...

  • stefdelecstefdelec Member, PRO Posts: 146

    Should i leave empty the space after "="
    if attribute =
    then...

  • GnarlyGnarly canadaMember Posts: 840

    No you can't have a blank attribute.

    It must be something. Even 0 is something to a computer.

    What behavior are you trying to trigger?

    You can always say when attribute is not 1.

    Coding logic takes some time understand. More details would help.

  • stefdelecstefdelec Member, PRO Posts: 146

    Yeah but the attribute should a,b,c...or z.

  • ArmellineArmelline Member, PRO Posts: 5,368
    edited August 2015

    You can have a blank text attribute. Just leave the space after "=" empty, that should work fine. See the attached demo for an example.

  • stefdelecstefdelec Member, PRO Posts: 146

    Tks!

Sign In or Register to comment.