CreateActor Problems

Game Editor comments and discussion.

CreateActor Problems

Postby joncb » Sun Apr 01, 2012 7:45 am

For some reason I am having problems re-creating actors I have destroyed. AT the end of a level I Destroy all the actors in the playing area in preparation for setting up the next level. However, when I go to CreateActor for the actors destroyed at the end of the level, they are not created. In the Actor Control I have "Create at startup:" set to No for each of the relevant actors, and there is no problem when I create them for the first level. The problem only occurs once I destroy them at the end of the leve and try to re-CreateActor for the next level.

Any suggestions?
joncb
 
Posts: 10
Joined: Sat Mar 03, 2012 1:54 am
Score: 0 Give a positive score

Re: CreateActor Problems

Postby skydereign » Sun Apr 01, 2012 8:25 am

CreateActor isn't dependent on if the actor was destroyed or not. So they should still be created. Are you sure they aren't being created? Perhaps the position you created them to is wrong? You can check if the actor was created by either checking the Actor* returned by the function (seeing if its cloneindex is equal to -1) or using a text actor to display the actor count (using ActorCount("actor_name")).
User avatar
skydereign
 
Posts: 3510
Joined: Mon Jul 28, 2008 8:29 am
Score: 589 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest