0
\$\begingroup\$

I'm trying to create health that is just numbers, I know how to do the bar but I just want it to show.

Here is the gml you need to see

plvl = 1;

mphlth = 75 + (plvl * 25);

phlth = 100
if (phlth >= mphlth) {
    phlth = mphlth
}
draw_text(10,10,string(phlth));

I also tried with the following:

draw_text(10,30,"health: "+string(player1.phlth)); 

Is there anyway to display the health number?

\$\endgroup\$
3
  • 1
    \$\begingroup\$ In which event is this code located? You can only draw when executing from Draw Event. \$\endgroup\$
    – altskop
    Commented Jul 9, 2018 at 21:21
  • \$\begingroup\$ i think it was i deleted the draw text to have the ability to play test all the other features the variables are still there is there anyway you can type the line or two of code to work since I gave the variables \$\endgroup\$
    – user117803
    Commented Jul 11, 2018 at 3:19
  • \$\begingroup\$ i don't see why the code didn't work \$\endgroup\$
    – user117803
    Commented Jul 11, 2018 at 3:21

1 Answer 1

0
\$\begingroup\$

sorry I found it out on my own all I had to do was make it a global variable then type draw_text(32,32,phlth); numbers are changeable

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .