Actor Variable Bug

Non-platform specific questions.

Actor Variable Bug

Postby Bee-Ant » Mon Aug 02, 2010 2:44 am

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
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: Actor Variable Bug

Postby DilloDude » Mon Aug 02, 2010 3:27 am

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.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Re: Actor Variable Bug

Postby Bee-Ant » Mon Aug 02, 2010 3:57 am

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.
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest