Yeah, you don't want to do it that way. That is the same thing as doing this.
- Code: Select all
CreateActor("Tile1", "Tile1", "no parent", "no path", tX, tY, false);
It is good however that you've learned how to use an Actor*. But, if you want to create clones, all you need to use is the above script. When you create a clone, it takes the clone with the highest cloneindex, and ups that by one. Actors have a name variable, clonename variable, and cloneindex variable. The name, is the name of the actor. The cloneindex is the indexing for the clone, a unique tag for each of them. The clonename combines the two as actor_name.cloneindex. So, what your code does is store a clonename into tName, so you can get a specific clone (which doesn't exist), and get the clones name (removing the cloneindex). Because of this, all you have done is add the cloneindex so you can remove it later.