Advertisement
Guest User

Gif Record GameMaker

a guest
Jun 9th, 2019
520
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /// @description
  2. var rec_pressed = keyboard_check_pressed(ord("H"))
  3.  
  4. if (rec_pressed)
  5. {
  6.     if (!recording)
  7.     {
  8.         recording = true
  9.         var appw = surface_get_width(application_surface)
  10.         var apph = surface_get_height(application_surface)
  11.         gif = gif_open(appw, apph)
  12.     }
  13.     else
  14.     {
  15.         recording = false
  16.         var path = get_save_filename("knife_life|*.gif", "" +
  17.             string_format(current_day, 2, 0) + "-" + string_format(current_month, 2, 0) + "-" + string(current_year) + "   " +
  18.                 string_format(current_hour, 2, 0) + "|" + string_format(current_minute, 2, 0) + "|" + string_format(current_second, 2, 0) + ".gif")
  19.  
  20.  
  21.             //string(current_time) + ".gif")
  22.         gif_save(gif, path)
  23.     }
  24. }
  25.  
  26. if (recording)
  27. {
  28.     gif_add_surface(gif, application_surface, 2)
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement