I am becoming a big fan of Extension/Functions since they let me parameterize a block of common code and use it for handling multiple objects. The one thing I have not been able to figure out is how to update the text of a scene’s text object from within the function.
I have a text object named “nameSelected” and if I add the following code from the scene’s event/action screen, it works fine:
Do = “U” to the text of nameSelected
If I create an action within a function, I get an error saying “the object does not exist or can’t be used here”.
I tried creating the “Modify the text of a Text object.” action using the actions list and also tried copying the action from the scene action to the function - same results.
Should this work? If not, why is the “Modify the text of a Text object” action available when in a function?