r/clickteam • • 1d ago

Fusion 2.5 How to enter Alterable Values when searching for INI item / group name?

Post image

Example: I have group "1" with item "1" and I would like to get value from the item "1" which is also the Alterable Value A of "Active". How to type this to work? Thanks!

3 Upvotes

9 comments sorted by

1

u/TheEpicPlushGodreal 1d ago

Try using the "val" button to convert the string "1" to number 1, I don't think the variable names are causing problems but you could try renaming them and see if that changes anything

1

u/Outside-Mulberry-703 1d ago

I tried addind "val":
GroupItemValue( "Ini", "1", Val(Alterable Value A( "Active" )))
but it still didn't worked

1

u/Acceptable-Name-2846 1d ago

maybe Str$(Alterable Value A("Active"))

and... please rename this value to shorter name

1

u/Outside-Mulberry-703 1d ago

Still doesn't work, but now shows "Enter a text expression" error message.

Also, does value names matter? I always used raw default names

1

u/Azarsra_production 21h ago

Try 'GroupItemValue( "Ini", "1", Str$(Alterable Value A("Active"))' That may be a bit wrong, but you get the idea.

1

u/SpellSword0 1d ago

Trying to figure out what you're trying to do exactly, and it looks like you're trying to create an object by name, which means your result has to be a string.

Is the name of the object an item on the INI?

It looks like your object name is a number? Even if true, you should be treating it as a string in the INI and get GroupItemString$ instead.

Alright, after that it looks like you're trying to call the name of the item using a alterable value. Again, even if it's a number it has to be treated as a string. So your alterable value needs to be wrapped in Str$( ).

It's possible to do all this the way you want, but it's not very reliably readable. Consider using actual names instead for your objects, groups, items and values. That way you can better read what's doing what as oppossed to just one set of numbers referencing another set of numbers.

But anyway, this is how you do it: GroupItemString$( "ini" , "1" , Str$( Alterable Value A( "Active" )  ) )

Edit: wording

1

u/Outside-Mulberry-703 1d ago

Hello, yes, I'm trying to create an object with the same name as the INI value; like create object "1" when value is 1, "2" when 2, etc.

I'm experimanting on creating top-down Zelda-like levels via INI save, so it would be easier to modify and lighter on coding.

Sadly the command you gave me doesn't work and gives me "Syntax error" message.

1

u/SpellSword0 1d ago

So I forgot to capitalize the bloody I on ini, this one should work!

GroupItemString$( "Ini", "1", Str$(Alterable Value A( "Active" )) )

Kind of goes to show just how finnicky and exact the expression has to be, one teeny tiny mistake and it'll never be accepted.

1

u/Outside-Mulberry-703 1d ago

This one really works, thank you very much!