Page 1 of 1

Variable, Things, Questions

PostPosted: Sun May 20, 2007 11:07 am
by Caaz Games
if I make a variable And Wanted to use it like a XP Bar like
Code: Select all
if(MyVariable == 500)
{
      LevelUp = 2;
}
Im Not So Sure How To Use It Or Any Thing So Can You People Help Me???

Also I Need To Know How To Place The Green Square Thingys In Sid Of Filled Reigens But Sort of Spread Out.

PostPosted: Sun May 20, 2007 11:54 am
by dimster
wouldnt it be:
Code: Select all
if(MyVariable >= 500)
{
      LevelUp = 2;
}


that might work... not sure though

PostPosted: Sun May 20, 2007 1:41 pm
by Sgt. Sparky
both should work,
but if you want to make it with different levels
use,
Code: Select all
if(myvariable >= 500)
{
    LevelUP = 2;
}
if(myvariable >= 1000)
{
    LevelUP = 3;
}r
if(myvariable >= 1500)
{
    LevelUP = 4;
}
//ect.

with the higher number continuing further on. :D
(I just use a variable called requred,
and when my variable(EXP) is greater than or equal to required( >= )
oi, well here is an example.
Code: Select all
if(EXP >= required)
{
    if(required == 0)required = 500;
    else required *= 2;
    Level++;
}

:D