Here is the basic setup^
The red circles are ghost_base that handle all the collision, variables, etc... for my AI ghost bad guys. Each circle is a clone of the AI_ghost_base actor. The brain in the top corner initialises the ghost bases and then activates them to begin moving along their specified path.
- Code: Select all
strcpy(getclone2("AI_ghost_base",0)->AI_pathN, "lvl1_path1");
SendActivationEvent("AI_ghost_base.0");
strcpy(getclone2("AI_ghost_base",1)->AI_pathN, "lvl1_path2");
SendActivationEvent("AI_ghost_base.1");
When the base is activated it creates a child actor called AI_ghost_graphic. This is the part of the ghost that the player actually sees.
- Code: Select all
tempActor = CreateActor("AI_ghost_graphic", "move_SE", "Event Actor", "no path", 3, -15, false);
The problem is that when the player leaves the activation region contianing the two ghosts and then walks back into it the ghosts are not recreated as expected. I end up with several random things occuring most commonly the existance of two "graphics" on one base.
I also sometimes end up with copies of the ghost graphic sitting around that are not parented to any base.
Is it possible that the ghost graphics are not being attached to the activation region they are in when created or not being destroyed when the activation region is exited? I'm not sure what to try to fix this. I feel like I'm missing something that I should know.
Any thoughts would be appreciated. Thanks.