Page 1 of 1

Actor Variable Bug

PostPosted: Mon Aug 02, 2010 2:44 am
by Bee-Ant
I have found a new bug. In the next level load (using LoadGame() function), you can't pass value into actor variable.
This is how I tested it :
- LoadGame() to load the new level
- On Enemy -> Create Actor :
Code: Select all
CreateActor("HPBar',"HPBarSmall","(none)","(none)",0,-50,false);
HPBar.id=cloneindex;

- On Enemy -> DrawActor :
Code: Select all
strcpy(typename,NameLibrary[type]);
sprintf(animname,"%s%s%s",typename,ActionName[action],DirectionName[direct]);
ChangeAnimation("Event Actor",animname,NO_CHANGE);

And, when I check the HPBar.id, it's always 0 no matter whatever clonindex stored
When I check the animname, it's empty..no matter whatever string I have stored...
Then when using Global variable, it worked.
But, that's not what I want. I want to use actor variable. I have to use array for the global variable. Doesn't mean I don't like it, but I have so many arrays already.
I use Ubuntu 9.10

Re: Actor Variable Bug

PostPosted: Mon Aug 02, 2010 3:27 am
by DilloDude
Try
Code: Select all
CreateActor("HPBar',"HPBarSmall","(none)","(none)",0,-50,false)->id = cloneindex;

To make sure you assign it to the HPBar you just created.

Re: Actor Variable Bug

PostPosted: Mon Aug 02, 2010 3:57 am
by Bee-Ant
DilloDude wrote:Try
Code: Select all
CreateActor("HPBar',"HPBarSmall","(none)","(none)",0,-50,false)->id = cloneindex;

To make sure you assign it to the HPBar you just created.

OK, I will try it...
But the main problem is...
I can do the same method in 1.3.9 with no problem.