Home   Help Search Login Register  

Author Topic: Displaying integers?  (Read 650 times)

0 Members and 1 Guest are viewing this topic.

McHale

  • Guest
Displaying integers?
« on: 17 Jan 2003, 01:24:07 »
Im trying to write a script that shows variable numbers. Is it even possible to display integers as text on the screen?

Maybe theres a special way to convert an int to a string? Please help.   :-\

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:Displaying integers?
« Reply #1 on: 17 Jan 2003, 01:37:47 »
Yup! 'tis, but ya better check out the cutscenes... board.  :) Oh, and search the
Ed.Depot for already made scrolls.

Ya might get lucky, m8  :-*


(Sorry, I don't think I have a copy to attach right now  :-\ )


McHale

  • Guest
Re:Displaying integers?
« Reply #2 on: 17 Jan 2003, 03:11:14 »
Hmmm I don't think it's possible to display integers. I need to somehow get the numbers 0 to 100, 000 to be able to display on screen(depending on a certain condition)... Is there a script around that does something like this?

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Displaying integers?
« Reply #3 on: 17 Jan 2003, 04:03:53 »
It sure is possibly... by use of the format command...

eg.

hint format ["Number: %1", num ]

Where num is your variable. The %1 in the line will be replaced in the hint box by the variable you specify after the comma... you can also specify mulitple variables:

hint format ["Value 1: %1 \nValue 2: %2 \nValue 3: %3", num1,num2,num3 ]

The %1, %2 and %3 will be replaced by the variables after the comma. Remember to keep the order correct ;)

The \n in there just makes the text jump down to the next line... it has no effect on the variables... happy coding

Bremmer

  • Guest
Re:Displaying integers?
« Reply #4 on: 17 Jan 2003, 11:10:10 »
... and dont forget that you can do the same thing with titletext:

eg.

Titletext [format ["Value 1: %1 \nValue 2: %2 \nValue 3: %3", num1,num2,num3],[plain down] ]

 :)
« Last Edit: 17 Jan 2003, 11:10:35 by Bremmer »

McHale

  • Guest
Re:Displaying integers?
« Reply #5 on: 17 Jan 2003, 20:09:06 »
Thanks I already figured out. You're too slow!  :)

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:Displaying integers?
« Reply #6 on: 18 Jan 2003, 02:32:26 »
 ::) McRude, ye ba*tard.  :D they're not slow - you just went online too frikkin late!  :booty: