Alright thanks! I will have to change my code up XD
Just I can't seem to get good descriptions of what each function does and I keep getting more and more wanting to look at the source of GE but there are too many files for me. Or at least descriptions I can understand.
Yeah the Width/Height thing I know how it was suppose to be but I started out right but the problem was I wasn't getting the right results so I kept switching it around until I did. I knew my canvas was a square and thats why it was working but for some reason I kept getting strange results having them the right way.
My Game Editor is bugged I think... sometimes when I use the exact same scripts in a different ged the scripts are broken but work fine in others. Sometimes functions don't work but then I go back and try again after restarting GE and they work. I don't know if anyone else has this problem, its just a minor annoyance to me now that I know I can test if its my code or the game editor. I might have to re-download GE.
I have another question, OTHER THAN the documentation that comes with GE and using the search bar, is there ANYTHING that gives more better descriptions and tutorials on how to use ALL the functions of GE?
EDIT:
OMG!!! THANK YOU SO MUCH!!!So Draw Actor is when the actor needs to be drawn to screen? OMG! I have been looking for that function and I wasn't sure to trust it, I thought it meant something completely different! Using this helped me find an fatal divide by zero error, I almost unraveled all of existence
About your code again, firstly, your also has a possible divide by zero error. Adding an: if(MaxHealth){... Health/MaxHealth ...} will make sure that if the Max Health is 0 then you wont get the error.
Also, even after changing the variables to floats I still couldn't get your code to work
So I am wondering what is the difference.. How did you get yours to work?
EDIT:
I don't get it... These two are the same... Why doesn't the second one work.
- Code: Select all
//Int Version, PlayerMaxHealth is an int
if(PlayerMaxHealthf){hpPercent = PlayerHealthf/(float)PlayerMaxHealth;}
//Float Version (This version doesn't work)
//if(PlayerMaxHealthf){hpPercent = PlayerHealthf/PlayerMaxHealthf;}