Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  

hudmessage troubles...

Recommended Posts

I dunno what I'm doing wrong, but it seems I'm putting it in right and it just wont show up on the screen. So at first I thought it was sethudsize, so I removed that from the picture. Now it's down to the basics of just replacing a piece of text and it wont even do that. So I'm utterly confused and now I'm at a loss as to what to do, if anyone can give me a suggestion as to what's wrong, it'd be appreciated.

 #include "zcommon.acs"
#Define MONINIT 998
#Define APMON 997
int APC [8]; //the number indicates the amount of AP
int ablAct [8]; //array check for toggling of active ability

function int maxval (int x, int y)
	if (x > y)
		return (x - y);
return (y-x);

function int minval (int x, int y)
return 1;

function void UPDATEBAR (int lastval, int newval, int pnum)
//int acounter;
//hudmessage(s:"pnum: ", i:pnum, s:"Diff:", i:diff, s:"apc:", i:apc[pnum]; HUDMSG_PLAIN, 202,1, 700, 75, 1);
/*	for(acounter = minval(lastval, newval); acounter < maxval(lastval, newval); acounter++)
		hudmessage(s:"a"; hudmsg_fadeout, acounter, 3, 56.1 + acounter << 16, 559.0, 1);
		}*/ // For when I figure the hard way out
//for the time being..
	hudmessage(s:""; Hudmsg_plain , 50, CR_YELLOW, 0.1245, 0.9245, 0);
		hudmessage(i:apc[playernumber()]; Hudmsg_plain | hudmsg_log , 50, CR_YELLOW, 0.1245, 0.9245, 0); //<-- item causing problems

script 999 ENTER
setactorproperty(0,APROP_ALPHA, 0.1);
ACS_Execute(MONINIT, 0,0,0,0);

Script MONINIT (void) //initializes the display script for ap
int bcounter;
int acounter;
apc[playernumber()] = 100; //defaults the ap bar to full
hudmessage(s:"a"; HUDMSG_PLAIN, 0, 0, 20.1,550.0,0); //pastes the bar on the screen
updatebar(0, 100,playernumber());

Script APMON (void)
	int currentcheck;
	currentcheck = apc[playernumber()];
	if (apc[playernumber()] > 100) 
		apc[playernumber()] = 100; 

	if (apc[playernumber()] < 0) 
		apc[playernumber()] = 0; 

		//print(s:"Execute 1");
	while( apc[playernumber()] == currentcheck) 
		currentcheck = apc[playernumber()];
		//hudmessage(s:"Current AP Value: ", i:apc[playernumber()]; HUDMSG_PLAIN, 202,1, 700, 45, 1);
	updatebar(currentcheck, apc[playernumber()], playernumber()); //argument is for a better drawing method I haven't figured out yet

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this