Advertisement
Guest User

Untitled

a guest
Aug 1st, 2014
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. /// create event
  2.  
  3. global.s_prev = surface_create(view_wview[0], view_hview[0]);
  4. view_surface_id[0] = global.s_prev; //Assign the surface to the view
  5.  
  6. global.s_next = surface_create(view_wview[0], view_hview[0]);
  7. view_surface_id[0] = global.s_next; //Assign the surface to the view
  8.  
  9.  
  10. transition=false
  11. fraction=0
  12.  
  13.  
  14.  
  15. // step event
  16.  
  17.  
  18. if transition=true
  19. {
  20. global.s_prev = surface_create(view_wview[0], view_hview[0]);
  21. view_surface_id[0] = global.s_prev; //Assign the surface to the view
  22.  
  23.  
  24. transition=5
  25. room_goto_next()
  26. }
  27. if transition=3 and fraction>-700
  28. fraction-=5
  29. else
  30. if fraction<=-700
  31. {
  32. fraction=0
  33. transition=0
  34. }
  35.  
  36.  
  37. /// draw event
  38. if transition=3
  39. {
  40. if !surface_exists(global.s_prev)
  41. {
  42. //Check surface!
  43. game_end()
  44. global.s_prev = surface_create(view_wview[0], view_hview[0]);
  45. view_surface_id[0] = global.s_prev; //Assign the surface to the view
  46. }
  47. else
  48. {
  49. //Now draw the surface to the screen
  50. if view_current == 2
  51. {
  52. draw_surface(global.s_prev,0+fraction, 0);
  53.  
  54. }
  55. }
  56.  
  57.  
  58. if !surface_exists(global.s_next)
  59. {
  60. //Check surface!
  61.  
  62. global.s_next = surface_create(view_wview[0], view_hview[0]);
  63. view_surface_id[0] = global.s_next; //Assign the surface to the view
  64. }
  65. else
  66. {
  67. //Now draw the surface to the screen
  68. if view_current == 2
  69. {
  70. draw_surface(global.s_next, 800+fraction, 0);
  71. }
  72. //else
  73. //{
  74. //draw stuff to surface here
  75. //}
  76. }
  77.  
  78.  
  79. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement