Lives resetting to 3
by Steve Gathercole · in TGB Platformer Kit · 03/28/2008 (2:24 pm) · 9 replies
Hi,
I am utilising the starter kit for my own game but can't seem to figure out why when using the
PlayerClass::updateExtraLivesGui(%this) function
my screen GUI ,(which I called ExtraLivesCounter),updates fine on the screen when he dies , ie drops to 2, but when he respawns the
ExtraLivesCounter.Text = 0 @ %this.ActorBehavior.Lives;
get's set back to 3 for some reason ?
I must be missing something simple..
Steve
I am utilising the starter kit for my own game but can't seem to figure out why when using the
PlayerClass::updateExtraLivesGui(%this) function
my screen GUI ,(which I called ExtraLivesCounter),updates fine on the screen when he dies , ie drops to 2, but when he respawns the
ExtraLivesCounter.Text = 0 @ %this.ActorBehavior.Lives;
get's set back to 3 for some reason ?
I must be missing something simple..
Steve
#2
I have not changed the lives in the actor behaviour just left everything as is..
Every time he respawns the lives get reset to the start value of 3..
Steve
03/28/2008 (3:09 pm)
I have used the kit but used my own graphics for the player who is setup using the spawn point behaviour set to use the dragon template, (I names my graphics accordingly).I have not changed the lives in the actor behaviour just left everything as is..
Every time he respawns the lives get reset to the start value of 3..
Steve
#3
Give that a go
03/28/2008 (3:19 pm)
What are the settings on the spawn point? I think I neglected to tell people to uncheck "AutoDepsawn" for the player's spawn point.Give that a go
#4
Steve
03/28/2008 (3:44 pm)
I unchecked AutoDespawn, which stopped the lives resetting, but he remains in the dieanimation and no keys works for movement ..Steve
#5
03/28/2008 (10:24 pm)
Do you have a valid spawn animation?
#6
I have had another attemp to sort the issue and it appears the problem is with the spawn animation,if I use yours everyting is okay, but any attempt to use my own animation results in the spawn not finishing and everything seems to be waiting for the spawn animation finish.
The only workaround I have found is to edit your spawn sprite sheet and change the images ...
(the spawn sheet which sits in the resources\platformerArt\data\images\actor as this seems to be where the spawn animation is refrenced from, rather than my own images folder as is the case with the other animations).
Everything else seems fine.
Applogies for my 'newbie' knowledge only just started with TGB..
Steve
03/29/2008 (5:34 am)
Philip,I have had another attemp to sort the issue and it appears the problem is with the spawn animation,if I use yours everyting is okay, but any attempt to use my own animation results in the spawn not finishing and everything seems to be waiting for the spawn animation finish.
The only workaround I have found is to edit your spawn sprite sheet and change the images ...
(the spawn sheet which sits in the resources\platformerArt\data\images\actor as this seems to be where the spawn animation is refrenced from, rather than my own images folder as is the case with the other animations).
Everything else seems fine.
Applogies for my 'newbie' knowledge only just started with TGB..
Steve
#8
Many thanks for taking the time to answer these forum questions. I have now realised where all my problems were, it was my limited understanding of resource files.
I now have everything worling okay with my own graphics and associated resource files..
Steve
03/30/2008 (2:26 am)
Philip,Many thanks for taking the time to answer these forum questions. I have now realised where all my problems were, it was my limited understanding of resource files.
I now have everything worling okay with my own graphics and associated resource files..
Steve
#9
03/30/2008 (2:54 am)
Thanks Steve, I am just glad you got it working properly. I am sure that there are things that need a bit more explanation and the FSM is one of them.
Associate Phillip O'Shea
Violent Tulip
How have you set up your player and have you done anything to the Lives field?