- Home /
Too many bugs
I don't know how, but there's just too many bugs in my game!!! Placement.
When I place my player at end of the level, it is at the start, When I place it at the start, It enters the void(as in minecraft).
It end game when energy = 0, but not when confidence/health = 0. Code:
function HealthConfidenceNRG(){
Energy -= EnergyLoss;
if (Energy == 0 || Health == 0 || Confidence == 0)
{
Time.timeScale = 0;
LostTheGame = true;}
}
//variables are define, just I dont want to show. type is proper.
also note the alternative i use earlier
unction HealthConfidenceNRG(){
Energy -= EnergyLoss;
if (Energy == -1)
{
Time.timeScale = 0;
LostTheGame = true;}
Debug.Log("Energy reduced to" + Energy);
if(Health == 0)
{
Time.timeScale = 0;
LostTheGame = true;}
if(Confidence == 0)
{
Time.timeScale = 0;
LostTheGame = true;}
}
Thank you in advance
Answer by Cherno · May 06, 2014 at 09:42 AM
What does "Start" and "End" of your level mean? What kind of controller are you using? If you place the First-Person Controller somewhere in your level, this is where you will start.
Again, it depends on what controller you are using. The FPC won't move through colliders if using physics for movement (AddForce and such).
Try ...
It's better to ask seperate questions for seperate issues.
okay, here are my answers to your questions.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
How to tell if two objects are right next to each other in a 2d game? 2 Answers
How to tell if an object is right next to another? 2 Answers
Need Help Programming... Please Help! Thanks :) 1 Answer
Controller work differently with same code and objects, but in different position 1 Answer