about the Level up scripts.

LazyKatt002

New member
Morning all,  ;D more questions sorry haha
After getting the Level up system to work on my people,which i was crazy excited about lol.saw alittle  problem

Is there a way to manipulate the position of the LVL text under the characters name? i couldnt find it in the OpenborManual. On some of the modules it looks right but noticed the video text file had them at 320x240 or 480x272.

I set mine at 960x480 and i resized the stages to 2500x512. Now it looks off haha

[attachment deleted by admin]
 
you should have a file called update.c

update.c
Code:
// in update.c
void main()
{   	
//
    void p;
	int i, hp, mp, lv;

	for(i=0; i<4; i++){
		p = getplayerproperty(i, "entity");
		if(p){
			if("Travel"!=getentityproperty(p, "model")) {
				//HP text script
				hp = getentityproperty(p, "health"); if(hp<0) hp=0;
				drawstring(999999+160*i, 999999, 0, hp+"/"+getentityproperty(p, "maxhealth"));
				//MP text script
				mp = getentityproperty(p, "mp"); if(mp<0) mp=0;
				drawstring(999999+160*i, 999999, 0, mp+"/"+getentityproperty(p, "maxmp"));
				//Lv
				lv = getglobalvar("level."+i);
				if(!lv) lv=1;
				drawstring(22+160*i, 34, 0, "LVL"+lv);
			}
		}
	}
      

}

Edit this line
Code:
drawstring(22+160*i, 34, 0, "LVL"+lv);

22 pixels accross and 34 pixels down from edge of screen is where the LVL1 text will show, (I accidentally put 32 in the image)

160 pixels from there player 2 will display, repeated for each player.


Here's a picture for reference from final fight.

ff2.png


HTH

EDit: BTW this is not in the manual because levelup system is not a part of openbor, it's scripts that someone made a while ago.
 
Thankyou beastie, it was alitle confusing at first cause i kept getting a "couldnt not parse udpate.c"error in the logs,but thats cause i wasnt opening and saving it in the right program.

thanks again
 
Back
Top Bottom