#Game Score being shown in Negative,need help!

1 messages · Page 1 of 1 (latest)

half flicker
#

Hey! I followed Brackey's tutorial of how to make game in Unity and I am facing an issue and it is that my score value is being presented in negative,is there any way to change this negative value into magnitude so it will show it positive.Actually my player's movement is in backward direction,during making of game I messed up directions that it is why it is showing negative over there in the score. Please give me a solution to display it as magnitude form or positive..

sand muskBOT
#

Before others can help, a clear question must be formulated

When you ask a difficult question it is your responsibility to ensure that anyone reading it will have all of the information they need to understand and diagnose the problem. Sometimes questions aren’t as clear to others as they could be or they may be missing critical information needed to provide a correct answer.
Source: https://idownvotedbecau.se/unclearquestion

Please elaborate on your question by including all the relevant information such as:

  • The programming language within which you're working (if it is anything other than C#)
  • Exactly what it is you're trying to accomplish
  • Things you have considered/attempted already
  • Anything else that could aid answerers in resolving the issue
visual ermine
#

that is not the smartest solution in the slightest

#

but it works

crimson abyss
#

That's such a hack

#

And doesn't solve the problem

#

Don't band-aid a problem. Figure out why it happens, and avoid it in the first place

crimson abyss
sand muskBOT
#

It's hard to answer a programming question without code

Resolving a bug is almost impossible when the question doesn't include any of the buggy code. In order to help fix the problem, answerers are going to have to see what the code is.
Source: https://idownvotedbecau.se/nocode

Please isolate the problematic code and send it as a codeblock. If you don't know how to send a codeblock, type []cb

sweet nebula
half flicker
#

ok,I will provide you guys with code

sand muskBOT
#

An image of your code is not helpful

When asking a question about a problem with code, people who are volunteering to help need the text of the code. Unless you are asking about your IDE - and not the code itself - images of the code are not an acceptable substitute.
Source: https://idownvotedbecau.se/imageofcode

Please send your code as a codeblock. If you don't know how to send a codeblock, type []cb

crimson abyss
#

But the error is plainly obvious from here. You're just printing the x coordinate. Your player must obviously be moving left in the world - not right

half flicker
#

Guys,thanks for the help and advices. I actually solved the problem using @sweet nebula 's solution and also again thanks to others for helping..