Let me try to explain...
I have an actor ENV_obstacle. There are two tiled clones of this actor. One creates a horizontal wall and the other creates a vertical wall. I am creating additional clones of this actor in script at runtime. I am trying to set things up so that I can create some clones that will use the horizontal tiled version of the actor (call it ENV_obstacle.0) and some of them will use the vertically tiled version of the actor. (call is ENV_obstacle.1)
I can get it to create clones that use the same tiled state as ENV_obstacle.0 using this code:
- Code: Select all
CreateActor("ENV_obstacle01", getAnimName(0), "(none)", "(none)", 0, 0, false);
However all my other attempts to get it to clone ENV_obstacle.1 have failed. Is this possible?
Code examples I know do not work:
- Code: Select all
//Trying to specify any clone here causes GE to crash
CreateActor("ENV_obstacle01.0", getAnimName(0), "(none)", "(none)", 0, 0, false);
- Code: Select all
//specifying other animation indexes causes the create actor to do nothing
CreateActor("ENV_obstacle01", getAnimName(1), "(none)", "(none)", 0, 0, false);
You might ask why I don't just create two different actors. The reason is that I am trying to take advantage of the new obstacle avoidance in MoveTo and it will only avoid one actor at a time. Thus all my path obstacles have to be clones of the same actor.
Second I am using my own level format (similar to creating tiles based on a text file) where the levels are generated at runtime and not built by hand in the main game file.
Third I am using a tiled actor in an attempt to reduce the total number of actors created at one time. By using a tiled actor instead of individual actors for each part of the tiled actor I am reducing total actor count by around 8 actors per instance. I guess that will help performance?
The target platform is PPC so it needs all the performance gains it can get.
Hence the weird and quite confusing situation. Did that make any sense at all?