I have no idea what you're doing - adding "WalkTo" to a string and then converting it to a value is going to result in 0. Str$(Val() is the same as X.


I have no idea what you're doing - adding "WalkTo" to a string and then converting it to a value is going to result in 0. Str$(Val() is the same as X.
the result is 0 indeed
basically I'm trying to force some alterable values to be set to the numeric conversion of strings (= value("String name") ), and that's pretty usual, I suppose, and naturally it works, but I have lots of those: so the problem is that I'd like to get that string name composed by the content of an alterable string + a fixed portion of text. I hope it's clear enough... and I hope it's possible, or I'll have to create a quite big number of actions :cry:


Why do you need to do that?
because I'm setting up a sort of editor inside the game itself.
The numeric conversion of a string value() wants a name, the name of an existing string object:
value("Hotspot1 WalkTo")
and if I try to compose that name with two strings it fails to be recognized:
value("Hotspot1" + " WalkTo")
so the problem is not the alterable string in the first half of the expression,
value(Alterable String J( "Group.Indicator" ) + " WalkTo")
but the fact that I don't give to value() a plain object name.


Ah, you definitely can't dynamically reference objects by name. You could set an alterable string to a "name" instead, and dynamically reference them by that.
Nope, as my post goes: You can in the latest HWA build, but only by index. AltStrN$( "Active", > Enter value here <) for strings and AltValN( "Active", > Enter value here <) for values.Originally Posted by Jamie
but when I must set the alt value to the numeric conversion of a string object it asks for the object name: how can I give it that object name if -as you suggest- I have a string containing the name instead? MMF will check for the existence of a string object with that name, and it won't find it, because it's an expression and not an actual name. Right? I hope I'm wrong!Originally Posted by Jamie
No. You can compare objects strings/values from within the expression editor.
You just need to make sure you select the right object first in your conditions so that it returns the name from he right object.
but is it possible in any way to compose an object's name with an expression?
let's say, I set a series of alt values to a corresponding series of strings (numeric conversion) whose names are composed by the alt values' names + another text string.

You can use ValueAdd to set and retrieve "extended alterable values" by name. That help?