blarg Posted November 9, 2008 I'm trying to make a bar graph using ACS that displays the player's kill, item, and secret percentages at the end of each level, in place of the default intermission screen. Here's my code:SetFont("graphbk"); hudmessagebold(s:"A"; HUDMSG_PLAIN,994,CR_UNTRANSLATED,-0.28,-0.1175,0.0); SetFont("g_secret"); for(int secrets; secrets<=GetLevelInfo(LEVELINFO_FOUND_SECRETS)*100/GetLevelInfo(LEVELINFO_TOTAL_SECRETS); secrets++) { hudmessagebold(s:"A"; HUDMSG_PLAIN,990-secrets,CR_UNTRANSLATED,-0.733,-0.872-secrets/500,0.0); delay(2); } And this is what I get: I think this is because the loop is pasting the bar patch however many times the loop iterates over itself, instead of moving one pixel upward each time to produce a nice bar. I also think that the culprit argument, "-0.872-secrets/500" isn't working because secrets/500 is being rounded down to 0 each iteration, because secrets is an integer, and thus, making no changes to the patch's position on the screen. Is there a way to create a decimal/fixed/float-point variable to avoid this problem? Or is there a way to use pixel coordinates (something like 256,128) in hudmessage? I seem to remember seeing something about that somewhere, but the hudmessage page of the ZDoom wiki doesn't mention pasting by pixels. 0 Share this post Link to post
Isle Posted November 9, 2008 yes http://zdoom.org/wiki/Data_Types and yes http://zdoom.org/wiki/SetHudSize 0 Share this post Link to post