Been banging my head on the wall over this. I want to take the text I put in the edit field and use it as an object name in code.
Simplest Example I can think of:
on the map I place 10 cars and name them car1 - car10
I have 1 edit field in my dialog
basically the idea is to make the car I choose "moveto" by typing the name of the car in the edit box and running the code.
is there a way to use call format and ctrltxt to do this. I tried various things and kept getting the type string, type expected object error.
I ran this through and didn't get the error but the object didn't execute the command.
{call format [_car = %1", (ctrltext IDC)]};
_car moveto.....
or
_acar = ctrltext IDC;
{call format ["_car = %1", _acar]};
Basically the same thing.
I didn't get any errors but the object doesn't moveto
Anyone have an insight on how to take text from an edit field convert it to an object name to be executed in code?
I have a dozen things I would like to use this for but can't seem to get it to run.
Respectfully
Jones