(Solved) Invisible Text

I have some calculations that are being done that I need to have in my game. the problem is that I don’t want them to show up on the screen. How can I have them run there calculations but be invisible on the screen? Do I have to just change the text color or is there another way to hide them?

Michelle [import]uid: 72372 topic_id: 13913 reply_id: 313913[/import]

Not sure I understand the problem. You only need to display things you want do display. Any math you have only shows if you tell it to show:

[lua]local number1 = 10
local number2 = 2

local showNumber1 = display.newText(number1, 10,10, native.SystemFont,16)
local showNumber2 = display.newText(number2, 10,30, native.SystemFont,16)

local number3 = number1 * number2
local number4 = number1 / number2
local number5 = number4 + number3

local showNumber5 = display.newText(number5, 10,60, native.SystemFont,16)

number5 = number5 * number1 * 2 / number3 + nummber4
showNumber5.text = number5[/lua]

You do your math with normal variables and they will not show. For the things you want to display, you have display text objects who’s first parameter is the default string to show. Later if you want to change what is showing, you just set its .text property to the new value and it will update automatically.

So all of my numberX = whatever calculations never display anything. If I want to show them, I have to either create a new display.newText() object or change an existing one’s .text property.

does that help? [import]uid: 19626 topic_id: 13913 reply_id: 51138[/import]

This is what I have and I only want to show the number value that is output at the Reminder. Nothing else.

[lua]local valueTXT = display.newText("Value: "…number,150,350,nil,20)
localGroup:insert(valueTXT)
local sumTXT = display.newText("Sum: ",150,370,nil,20)
localGroup:insert(sumTXT)
local reminderTXT = display.newText("Reminder: ",150,390,nil,20)
localGroup:insert(reminderTXT)[/lua]
[import]uid: 72372 topic_id: 13913 reply_id: 51142[/import]

In your example above you only have one number, a variable called “number” that you are appending to a string who’s text is "Value: ".

The next two blocks, output the string "Sum: " and the string "Reminder: ".

What math are you trying to perform? What variables hold those calculations.

I think this is what you are trying to do in general terms:

[lua]local value = 1
local number = 2
local sum = value + number
local reminderTXT = display.newText("Reminder: " … sum ,150,390,native.SystemFont,20)
localGroup:insert(reminderTXT)[/lua] [import]uid: 19626 topic_id: 13913 reply_id: 51147[/import]

The value is a number pulled from another screen. lets say its 472

the sum is sum of the digits in that number 4 + 7 + 2

The remainder is giving me the main answer I need after the value and sum do what they need to do.

So with that being said. I need all the calculations to work but I only want to show the output of the Remainder.

[import]uid: 72372 topic_id: 13913 reply_id: 51149[/import]