Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// create event
- global.s_prev = surface_create(view_wview[0], view_hview[0]);
- view_surface_id[0] = global.s_prev; //Assign the surface to the view
- global.s_next = surface_create(view_wview[0], view_hview[0]);
- view_surface_id[0] = global.s_next; //Assign the surface to the view
- transition=false
- fraction=0
- // step event
- if transition=true
- {
- global.s_prev = surface_create(view_wview[0], view_hview[0]);
- view_surface_id[0] = global.s_prev; //Assign the surface to the view
- transition=5
- room_goto_next()
- }
- if transition=3 and fraction>-700
- fraction-=5
- else
- if fraction<=-700
- {
- fraction=0
- transition=0
- }
- /// draw event
- if transition=3
- {
- if !surface_exists(global.s_prev)
- {
- //Check surface!
- game_end()
- global.s_prev = surface_create(view_wview[0], view_hview[0]);
- view_surface_id[0] = global.s_prev; //Assign the surface to the view
- }
- else
- {
- //Now draw the surface to the screen
- if view_current == 2
- {
- draw_surface(global.s_prev,0+fraction, 0);
- }
- }
- if !surface_exists(global.s_next)
- {
- //Check surface!
- global.s_next = surface_create(view_wview[0], view_hview[0]);
- view_surface_id[0] = global.s_next; //Assign the surface to the view
- }
- else
- {
- //Now draw the surface to the screen
- if view_current == 2
- {
- draw_surface(global.s_next, 800+fraction, 0);
- }
- //else
- //{
- //draw stuff to surface here
- //}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement