Guest User

Game maker Zelda like health codes

a guest
Mar 30th, 2011
1,025
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. global.hp = 3
  2.  
  3. draw_sprite(Healthpoints_spr,global.hp,view_xview+10,view_yview+5)
  4.  
  5. hurt=0
  6.  
  7. hurt=0
  8.  
  9. if hurt=1{
  10. image_alpha=0.5;
  11. }else{
  12. image_alpha=1;
  13. }
  14. if global.hp < 1 instance_change( obj_player_death , 1 );
  15.  
  16. if (hurt=0)
  17. {
  18. global.hp-=1//do your damage to the charactor
  19. hurt=1
  20. alarm[0]=30 //or whatever alarm you want and whatever time you want him to be invincable
  21. }
Advertisement
Add Comment
Please, Sign In to add comment