Today I started by working on the custom health bar. Yesterday, I had set a goal of making up to the 50th image for the bar, but I only made it to 45. The reason being for that, is that I was trying to help Justin with creating the shadows that work behind the player. I could have made more progress had I not been doing so.
The problem that I was having while making the shadows with Justin was that one of the sprites was not changing to the correct image at the right time. When the player is standing still with the gun, the shadow behind them looks as though they are in a still running position, and the shadow for the player's arm was way off of the position it was meant to be in. I tried a few different ideas of correcting the image for the player, but in the end I decided to trash it and just revert back to what Justin had made in the first place. ( And even then he chose to just get rid of the shadows entirely. They looked a little bit odd anyways. )
I tried adding a few variables to help tell if the player was moving or not, whether they were holding a weapon or not, as well as which direction they are facing in order to help determine the sprite to draw.
for reference, 1 means true, and 0 means false.
obj_player, in event draw
if holding=1 && Left=0 && Right=1 && Holding=1 && Moving=0{
draw_sprite(spr_PlayerGunRight,1,black,0.5,1,1,1,1)
}
Something along those lines really, I don't know the exact arrangement of the numbers in the draw_sprite event.
As for the health bar, I should be able to hit 100 by tomorrow if I make a good enough amount of progress tonight, however with the Grad Cruise in place, I will not have as much time to work on it. I think that if I can get to approximately 60 health tonight, I will have enough time in class tomorrow to be able to finish the bar entirely. Then from there I will be able to put the health bar in it's proper position and size on screen, following the view of the current room. We'll just see what tonight brings in terms of progress.
For the future, I am considering making a custom ammo counter as well, which shouldn't be too difficult, just alike the health bar, alot of work. I will have to cap the amount of ammo a player can carry at one time, so that I am able to make a limited number of sprites. (That or I could make a few sprites and use the draw_sprite feature with a few custom numbers to show the ammo in a similar fashion.)
Tomorrow I plan on finishing the health bar (if I have completed enough work by tonight), and if so then I hope to code in all of (or at least some of) the changes to the health bar based on the health value of the player. What did I learn today?
...this is some tedious work.
No comments:
Post a Comment