I've created a simple action which displays an arbitrary text whenever the player comes close to the entity, and the string to be displayed is defined in string1. The problem is, whenever I assign the action to 2 or more entities in the level, when displaying the text, it appears to display both the old and the new content, overwriting each other. The action's code has some local pointers initialization at the header, like this:
Code:
action act_notepad()
{
    TEXT *my_text = txt_create(1, 1);
    ...
    // When the player comes close to the text, display it.
    // Hides the text if the distance between the player and me is larger than 242.0.
    // Destroys the text if the level is no longer valid.
}



Here are a few screenshots to make it clearer what I mean. I have two entities in the level, they share the same action, with different string1 on each entity:

First time, the text just do the correct thing:


But when viewing the second text, the problem emerges:


I know the problem lies somewhere in the local TEXT object inside the action definition, but I don't have a solid reason as well as how to solve this as I have no idea how "action" works and how these local objects are stored in Acknex.

Have anybody encountered something like this before? Any insights is appreciated.