Jump to content


Photo

sprite_create_from_screen crashes game - SOLVED


  • Please log in to reply
3 replies to this topic

#1 Kyymehra

Kyymehra

    GMC Member

  • GMC Member
  • 56 posts
  • Version:GM8

Posted 16 June 2012 - 05:10 PM

I'm trying to take a screenshot of the background for a pause menu, but the game just freezes. This is in my controller object's press p-key event.

pause_bg = sprite_create_from_screen(view_xview[0], view_yview[0], view_wview[0], view_hview[0], 0, 0, view_wview[0] / 2, view_hview[0] / 2);

This is so frustrating. What's wrong?

--EDIT:
Made an alternative code so I don't need this function. Guess I'll never know why that function doesn't work for me O_o.

Edited by Kyymehra, 16 June 2012 - 06:04 PM.

  • -1

#2 cantavanda

cantavanda

    GMC Member

  • Banned Users
  • 980 posts
  • Version:GM:Studio

Posted 16 June 2012 - 05:12 PM

Hmmm weird, I will think what the problem is

#3 Kyymehra

Kyymehra

    GMC Member

  • GMC Member
  • 56 posts
  • Version:GM8

Posted 16 June 2012 - 06:03 PM

Never mind, I screwed the function and went with screen_save and did some background replacement as an alternative technique. Working nicely.
  • 0

#4 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14385 posts
  • Version:GM:Studio

Posted 17 June 2012 - 07:03 AM

yeah. screen save is safest way... and it works in 3d

BTW you should have used 0,0 to view width,view height

the function captures the screen not the room image.
  • 1




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users