Problems when returning to an activation region.

Non-platform specific questions.

Problems when returning to an activation region.

Postby fauldran » Sat Jan 14, 2006 9:00 pm

I am having a problem where actors created using create actor are not recreated as expected when the view reenters an activation region.
Image
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);

Image
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.
Image
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.
fauldran
 
Posts: 43
Joined: Tue Dec 20, 2005 10:52 am
Score: 0 Give a positive score

Postby makslane » Mon Jan 16, 2006 12:47 pm

I need see what's happen.
Can you send me the game?
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Postby makslane » Fri Jan 20, 2006 6:28 pm

The problem is this:
You have actors created at startup (AI_ghost_base) that create other actor (AI_ghost_graphic), and with AI_ghost_base parent of AI_ghost_graphic;

The regions are linked to the actors created at startup.
For the actors created with "Create Actor" there is no warranty that will be created in the same region of the event actor, so, some times the AI_ghost_base are destroyed and AI_ghost_graphic not.

I think You can solve this problem now, by creating the AI_ghost_base in a "Create Actor" action too.
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest