Page 1 of 1

CreateActor() how do you create the actor with a sequence?

PostPosted: Tue Jan 16, 2007 5:35 pm
by kellyrey
If you have an actor that has a single animation, and several sequences defined; then try to create the actor in script specifying the sequence instead of the animation the CreateActor() function always fails.

For example, I have an actor named gem with a base animation of
"combined 176x220 copy" and animation sequence 1 to 30 defined.

In the view actor's CreateActor event this script line always fails:

Actor *pa = CreateActor("foo", "1", "(none)", "(none)", 0, 0, true);

WriteTraceInteger("pa->name", pa->name);

pa->name =

if I change the animation to "combined 176x220 copy" then the actor is created.

pa->name = gem


This does not happen if you select the CreateActor event for example set the view actor's create event to create the gem actor with the sequence instead of the animation. Then the new actor is created successfully.

Thanks
Kellyrey

PostPosted: Tue Jan 16, 2007 5:51 pm
by makslane
Please, upload a example (ged + data files)

Game editor src example...

PostPosted: Wed Jan 17, 2007 1:46 am
by kellyrey
Here is an example ged /w source. The view actor handles the CreateActor() event and attempts to create 2 actors via the CreateActor() function in the view actor's event script. In the first case the actor is created from the sequence and it fails, In the second case the actor is created from the base animation and succeeds.

Thanks
Kellyrey

PostPosted: Wed Jan 17, 2007 1:44 pm
by makslane
Ok, thanks. This bug will be solved in the next version.