Jump to content


Photo

Saving of the picture


  • Please log in to reply
6 replies to this topic

#1 zzzzza

zzzzza

    GMC Member

  • New Member
  • 3 posts
  • Version:GM8

Posted 30 May 2012 - 07:21 PM

At once I want to apologize, if it is not so clear. I it is simple from Russia.
As with Russian community to me didn't help, I want to address to you.
For cutting of the necessary image, I use screen_save_part (fname, x, y, w, h).
I want to make many screens but if I enter:
screen_save_part('screen.jpg',48,80,100,30)

in pressing of F12 and during game I will press F12, screen.jpg it will be replaced.
Tried so:
i=i+1; 
screen_save_part(i + 'screen.jpg',48,80,100,30);

In object create: i=0
On what GM gives out a mistake:
ERROR in 
action number 1 
of  Step Event 
for object obj_control: 

Error in code at line 2: 
    screen_save_part(i + 'screen.jpg',48,80,100,30) 
                         ^ 
at position 23: Wrong type of arguments to +.
Because of what a mistake I know but how to make on another I do not know (
If there are additional libraries, give the reference to a gallop please.
  • 0

#2 chrscool8

chrscool8

    GMC Member

  • GMC Member
  • 1646 posts
  • Version:GM:Studio

Posted 30 May 2012 - 07:39 PM

i is a number variable. You need to make it a string to concatenate it.

screen_save_part(string(i) + 'screen.jpg',48,80,100,30)
  • 0

#3 dannyjenn

dannyjenn

    GMC Member

  • GMC Member
  • 2224 posts
  • Version:Mac

Posted 30 May 2012 - 07:40 PM

Simple. A real cannot be concatenated with a string. Instead, use:
i=i+1; 
screen_save_part(string(i) + 'screen.jpg',48,80,100,30);

Edit - chrscool8 beat me to it, lol

Edited by dannyjenn, 30 May 2012 - 07:40 PM.

  • 0

#4 NukeTheCat

NukeTheCat

    GMC Member

  • GMC Member
  • 470 posts
  • Version:GM8.1

Posted 30 May 2012 - 07:40 PM

because i is real, not string.

try this:
i=i+1; 
screen_save_part(string(i) + 'screen.jpg',48,80,100,30);

This mistake is actually pretty common, hope you be more aware now. :)

EDIT: Aww, great! Ninja'd :ninja: by two of you!!!

Edited by Jlm07, 30 May 2012 - 07:45 PM.

  • 0

#5 zzzzza

zzzzza

    GMC Member

  • New Member
  • 3 posts
  • Version:GM8

Posted 30 May 2012 - 07:49 PM

chrscool8, dannyjenn, Jlm07, Thank you very much:D
  • 0

#6 zzzzza

zzzzza

    GMC Member

  • New Member
  • 3 posts
  • Version:GM8

Posted 30 May 2012 - 08:00 PM

Whether and it is possible to unite all these pictures and to create the video file? (fraps type) ))
  • 0

#7 dannyjenn

dannyjenn

    GMC Member

  • GMC Member
  • 2224 posts
  • Version:Mac

Posted 31 May 2012 - 02:07 AM

Whether and it is possible to unite all these pictures and to create the video file? (fraps type) ))

Not with any built-in functions.
There may be a way of coding it or perhaps using some sort of dll or something for this... not sure.
If not, there's probably some sort of free software somewhere to convert screenshots (or an animated gif containing screenshots) into a video file.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users