Home   Help Search Login Register  

Author Topic: Numbers Q  (Read 493 times)

0 Members and 1 Guest are viewing this topic.

Iva

  • Guest
Numbers Q
« on: 08 Nov 2003, 09:33:04 »
I was wondering how could i make script so my plane vould show Altitude on hud like
DKM mi-28. I dont know how i could separate numbers so i could set textures e.g.

if altitude is 179

i would have 1
                   7
                   9

so i could easely make

_plane setobjecttexture [1, format ["\Bla\Bla\%1.paa" _num select 0]

Unnamed

  • Guest
Re:Numbers Q
« Reply #1 on: 09 Nov 2003, 20:37:52 »
Not sure if this is what you want, but to break the number 179 up into units. Then something like this would work, there will be better ways, but in the mean time:

Code: [Select]
_Tens=179 Mod 100

_Hundreds=(179-_Tens) / 100

_Ones=(_Tens Mod 1)

_Tens=(_Tens-_Ones) / 10

_Ones=(_Ones-(_Ones Mod 1))  /  1

If it's altitude, then you will want to include thousands e.t.c.

Anyway hope this helps.

Iva

  • Guest
Re:Numbers Q
« Reply #2 on: 10 Nov 2003, 18:21:21 »
Thanks but i have made it my self.