displaying a variable

Game Editor comments and discussion.

displaying a variable

Postby deLusan » Fri Jan 19, 2007 7:13 pm

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:
deLusan
 
Posts: 1
Joined: Fri Jan 19, 2007 6:15 pm
Score: 0 Give a positive score

Postby Sgt. Sparky » Fri Jan 19, 2007 8:44 pm

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
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Postby Game A Gogo » Sat Jan 20, 2007 12:03 am

you don't need to use the round function when using a variable that has no decimal places.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron