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

You must understand the Game Editor concepts, before post here.

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

Postby kellyrey » Tue Jan 16, 2007 5:35 pm

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
kellyrey
 
Posts: 20
Joined: Tue Dec 19, 2006 9:56 pm
Score: 2 Give a positive score

Postby makslane » Tue Jan 16, 2007 5:51 pm

Please, upload a example (ged + data files)
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

Game editor src example...

Postby kellyrey » Wed Jan 17, 2007 1:46 am

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
Attachments
CreateActor Script Example.zip
(210.34 KiB) Downloaded 226 times
kellyrey
 
Posts: 20
Joined: Tue Dec 19, 2006 9:56 pm
Score: 2 Give a positive score

Postby makslane » Wed Jan 17, 2007 1:44 pm

Ok, thanks. This bug will be solved in the next version.
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score


Return to Advanced Topics

Who is online

Users browsing this forum: No registered users and 1 guest

cron