i have a rpg game with level and exp system but, i would like to add something extra,
like:
if u get lvl 2 u gain health and attackrate
if (_root.exp>100){
level = 2;
"Maxhealth = 200;"
stop();
^ <== thats what im trying nomal max healh = 150 and when u lvl up maxhealth gets 200
so if u use a potion or a healing field or spell u need maxhealth else u go over the health limit
if (_root.exp>=100){
level++;
Maxhealth = 200
//if its a textbox MaxHealth.Text=200
//also you exp leveling script isn't good unless you reset the _root.exp variable back to o
stop();
@on 2nd keyframe:@
note!1:
the roots should be placed on frame 1,and where you actually play the game is: frame 2 (or another frame if you made an intro and/or start screen,where the battle begins)
note!3:
if it’s a game based on frames and not on mc’s,ALWAYS instead of going to frame 1, let it go back to frame 2(note!4 if you have frame 2(and maybe more)filled with an intro or startscreen or etc. don’t change a darn thing)
if(_root.exp>99){
if(_root.lvl==1){
_root.maxp=_root.maxhp+50;
_root.attackrate=_root.attackrate+5;
_root.exp=0;
_root.lvl=_root.lvl+1
}
}
// it can be changed to a smaller version,but let's keep it nice and big so it's easier to understand;-)
if(_root.exp>149){
if(_root.lvl==2){
_root.maxp=_root.maxhp+50;
_root.attackrate=_root.attackrate+5;
_root.exp=0;
_root.lvl=_root.lvl +1;
}
}
if(_root.exp>199){
if(_root.lvl==3){
_root.maxp=_root.maxhp+50;
_root.attackrate=_root.attackrate+5;
_root.exp=0;
_root.lvl=_root.lvl +1;
}
}
stop()
//and on and and on.till your guy can reach the maxlvl you like him to :-)
be sure to read the notes! first before you just squat in the codes.
hope it was helpfull,if you don’t understand something of it ask me and i will make an in-depth explenation.
if it isn’t working or it has a bug tell me,
the problem will probably be the scripting of the heal spot.
you should probably make a formula for exp since its alot easier then writing if(exp >200){//blah blah } check my posts i remember posting one before it was a whole tile based thing i think