Multiplier?

Non-platform specific questions.

Multiplier?

Postby Hblade » Tue Dec 20, 2011 7:04 pm

YUZ :D I got it, nevermind :3
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Multiplier?

Postby schnellboot » Tue Dec 20, 2011 7:19 pm

just curious
what was your question?
schnellboot
 
Posts: 819
Joined: Sat Mar 31, 2007 1:35 pm
Location: Germany
Score: 102 Give a positive score

Re: Multiplier?

Postby Hblade » Tue Dec 20, 2011 7:56 pm

I was wondering how to make a proper "To Next" for gaining EXP and leveling up. Which I did :3 Here's the code for my RPG so far. (Just started on it :D)
Code: Select all
//Joystick Settings and Keyboard settings
#define JoyRight ((key[KEY_RIGHT]==1 && key[KEY_LEFT]==0) || (XAXIS>10000))
#define JoyLeft ((key[KEY_LEFT]==1 && key[KEY_RIGHT]==0) || (XAXIS<-10000))
#define JoyUp ((key[KEY_UP]==1 && key[KEY_DOWN]==0) || (YAXIS<-10000))
#define JoyDown ((key[KEY_DOWN]==1 && key[KEY_UP]==0) || (YAXIS>10000))

#define XBTN 0 #define CBTN 1
#define TBTN 2 #define SBTN 3

#define Xps (key[KEY_d]==1 || BTN[XBTN]==1)
#define Yps (key[KEY_w]==1 || BTN[YBTN]==1)
#define Cps (key[KEY_f]==1 || BTN(CBTN]==1)
#define Sps (key[KEY_s]==1 || BTN[SBTN]==1)
 
        //Width and height settings of screen
        #define ScreenWidth  view.width
        #define ScreenHeight view.height
 
                 //Player Stats
                 #define PlayerX GLOBAL_VARIABLES[0]
                 #define PlayerY GLOBAL_VARIABLES[1]
                 #define PlayerHP GLOBAL_VARIABLES[2]
                 #define PlayerMP GLOBAL_VARIABLES[3]
                 #define PlayerATK GLOBAL_VARIABLES[4]
                 #define PlayerDEF GLOBAL_VARIABLES[5]
                 #define PlayerMAG GLOBAL_VARIABLES[6]
                 #define PlayerSPD GLOBAL_VARIABLES[7]
                 #define PlayerLUCK GLOBAL_VARIABLES[8]
                 #define PlayerLEVEL GLOBAL_VARIABLES[9]
                 #define PlayerEXP GLOBAL_VARIABLES[10]
 
        //Importan Game Settings
        #define MoveSpeed 5
        #define GameFPS 30
        #define DefaultPosition 0
        #define ViewStartX -320
        #define ViewStartY -240
        #define StartLevel 1
        #define StartExp 0
        #define StartATK 25
        #define StartDEF 19
        #define StartMAG 20
        #define StartSPD 23
        #define StartLuck 16
 
 
 
 
 
 
 
int BTN[8], GLOBAL_VARIABLES[1000], TO_NEXT;
double XAXIS, YAXIS;
char *key;
 
        //Determine Level and get EXP info
        void
        GetEXPInfo(int START, double MULTIPLIER)
        {
            if(PlayerLEVEL<100)
            {
                TO_NEXT=START+(PlayerLEVEL*((START*MULTIPLIER)/2));
            }
            else if (PlayerLEVEL==100)
            {
                TO_NEXT=0;
            }
            if(PlayerEXP>=TO_NEXT && PlayerLEVEL<100)
            {
                PlayerLEVEL++;
            }
        }
 
        //Setup status to use in leveling up
        void
        GetStatusInfo(double M1,double M2,double M3,double M4,double M5)
        {
            PlayerATK=StartATK+(PlayerLEVEL*(M1));
            PlayerDEF=StartDEF+(PlayerLEVEL*(M2));
            PlayerMAG=StartMAG+(PlayerLEVEL*(M3));
            PlayerSPD=StartSPD+(PlayerLEVEL*(M4));
            PlayerLUCK=StartLuck+(PlayerLEVEL*(M5));
        }
        //Readings for player
        void
        SetupPlayer() {
            PlayerEXP=StartExp;
            PlayerLEVEL=StartLevel; }
 
void
Enable()
{
    int t;
    key=GetKeyState();
    XAXIS=GetJoystick1Axis(0);
    YAXIS=GetJoystick1Axis(1);
    for(t=0;t<7;t++)
    {
        BTN[t]=GetJoystick1Button(t);
    }
}


Lookie :3
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Multiplier?

Postby SuperSonic » Tue Dec 20, 2011 8:07 pm

Just out of curiosity. Weren't you previously working on that chao game? :P
A tree never hits an automobile except in self-defence.

Want to use your joystick or controller with Game Editor? Check out my controller engine =D
User avatar
SuperSonic
 
Posts: 1443
Joined: Fri Sep 24, 2010 9:24 pm
Location: Anywhere
Score: 72 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest