|
0 registered members (),
4,379
guests, and 15
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Screenshots
#82298
07/19/06 22:36
07/19/06 22:36
|
Joined: Jul 2005
Posts: 262 Earth, The Netherlands
NL_3DGS_n00b
OP
Member
|
OP
Member
Joined: Jul 2005
Posts: 262
Earth, The Netherlands
|
I have 2 questions:
1. How can I create a screenshot from ingame? 2. How can I display a specific image with specific width and height?
The best games are the games you create yourself.
|
|
|
Re: Screenshots
[Re: NL_3DGS_n00b]
#82301
07/20/06 06:30
07/20/06 06:30
|
Anonymous
Unregistered
|
Anonymous
Unregistered
|
Q2:
create an entity for the image: pic=ent_create...() scale it to your needed size: pic.scale_x=320/1024 (if you want to shrink 1024pix to 320 pix) (same with scale_y)
you need to know the size of the original image! (sys_metrics(0)?)
mercuryus
|
|
|
Re: Screenshots
[Re: ]
#82302
07/20/06 13:47
07/20/06 13:47
|
Joined: Jul 2005
Posts: 262 Earth, The Netherlands
NL_3DGS_n00b
OP
Member
|
OP
Member
Joined: Jul 2005
Posts: 262
Earth, The Netherlands
|
@Mercuryus about #2,
Can you give me a working code? I dont understand how to doe it... It isnt possible to create a normal bmap image on a panel with specific size?
The best games are the games you create yourself.
|
|
|
Re: Screenshots
[Re: NL_3DGS_n00b]
#82304
07/20/06 15:54
07/20/06 15:54
|
Anonymous
Unregistered
|
Anonymous
Unregistered
|
Hi! try this: (the bitmap has the size 1600x400, empty.wmb is an empty level) You can change the resolution in video_switch and the image stretches to the proper size... Code:
bmap bmp_bluepan = <blue_panel.bmp>;
// the panel with the image panel pan_blue { layer=1; pos_x=0; pos_y=0; bmap=bmp_bluepan; }
function main { video_switch(5,32,2); // set resolution, ... level_load("empty.wmb"); // load level wait(3); bg_color.red=1; // set background color bg_color.green=1; bg_color.blue=1; pan_blue.visible=on; // view panel pan_blue.scale_x=screen_size.x/1600; // and scale to resolution pan_blue.scale_y=screen_size.y/1400; while(1){ wait(1); } }
|
|
|
Re: Screenshots
[Re: ]
#82305
07/20/06 19:44
07/20/06 19:44
|
Joined: Jul 2005
Posts: 262 Earth, The Netherlands
NL_3DGS_n00b
OP
Member
|
OP
Member
Joined: Jul 2005
Posts: 262
Earth, The Netherlands
|
I will try to resize panels tonight, but I have a problem with creating screenshots, I am using freedll/bigdll and this is the script I use: Code:
string screenshotfilename = "scrn1.bmp"; function screenshot{ DllScreenshotSetData(0,0,screen_size.x,screen_size.y); DllScreenshot(screenshotfilename,D3DX_BMP); wait(1); if(DllScreenshot(screenshotfilename,D3DX_BMP) == -1){ exit; } } on_x = screenshot;
But I dont get any error, the game just exits because the IF statement returns -1. My question is, WHY is the IF statement returning -1? The DLL is defined correctly, cause the title changing works fine etc...
The best games are the games you create yourself.
|
|
|
Re: Screenshots
[Re: NL_3DGS_n00b]
#82306
07/20/06 21:50
07/20/06 21:50
|
Anonymous
Unregistered
|
Anonymous
Unregistered
|
can't say - ask TripleX... (by pm?)
mercuryus
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|