Page 1 of 1

displaying a variable

PostPosted: Fri Jan 19, 2007 7:13 pm
by deLusan
Folks - Im a REAL newbie and trying to display a variable from a text actor. Sonicfire has explained this previously, but i just dont get it. Please help.

Sonicfire says:
" in your actor go to "Text" and enter the amount of decimals you want to display your variable with. (e.g. one zero (0) or more (000)).
then choose "draw actor" event -> script editor and enter "textNumber = yourvariable;"

But -
(1)when i go to "Text", where do i enter the amt of decimals i want ?(none - i want a whole number).
(2) how do i display this variable on the game screen?

I am trying to decrese this variable by 1 each turn, and want to see it displayed at all times.

Can someone go thru it in step-by-step, click-here-click-there fashion for me?
:oops:

PostPosted: Fri Jan 19, 2007 8:44 pm
by Sgt. Sparky
I'm not sure but somthing like this
Code: Select all
textNumber=round.yourVar;
or
Code: Select all
textNumber=round(yourVar);

or even
Code: Select all
 textNumber = yourVar
if you do not add or subtract numbers less than one(numbers that are not decimals)
but I am not a script master :D :D :D :D :D but that should work, maybe PM novice bout' it, or even the Game Editor maker Makslane. They should know :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D EDIT: Must know! :D

PostPosted: Sat Jan 20, 2007 12:03 am
by Game A Gogo
you don't need to use the round function when using a variable that has no decimal places.