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