Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, Baklazhan, Ayumi, Hanky27), 1,387 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
bmap_for_screen help #451121
04/28/15 20:32
04/28/15 20:32
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline OP
Serious User
DLively  Offline OP
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
Code:
BMAP* screen_map = "emptypanel.pcx";
PANEL * testpan ={
	pos_x = 100;
	pos_y = 100;
	button = (0,0,screen_map, screen_map, screen_map, NULL,NULL,NULL);
	window = (0,0,400,300,screen_map, 0,0);
	flags = SHOW;
}
function grab_screen(BMAP* Bmap, var modify, var delay, STRING* Save_settings){
	bmap_for_screen (Bmap, modify, delay);  
	wait (1);  // wait 1 frame until the bitmap can be saved
	game_save ("savegame", 0, Save_settings);
}
on_q = grab_screen(screen_map, 1, 1, "SV_VARS + SV_BMAPS");

function grab_screen2(){
	bmap_for_screen (screen_map, 1, 1);   
	wait (1);  // wait 1 frame until the bitmap can be saved
	game_save ("savegame", 0, SV_VARS + SV_BMAPS);
}
on_z = grab_screen2;



Why Doesn't either of these methods work?
I don't get any syntax errors - But I also don't get any results :3

I basically pulled this from the manual and I'm trying to make it a bit more function-able..
Everything seems to be in order...

The bmap pointer is Valid
button and windows are set up
panel is visible
bmap was selected
vars were set
parameters were saved..... now what? grin

Shouldn't this have worked? or is there a #include file I need? Once again, I get no errors..


EDIT: grab_screen2(); will work fine if i hard code it. I want it to work with the press of keys as I shown above. is that possible?

EDIT2: I realize that
Code:
if(key_z) grab_screen2();

would work - But Im trying to avoid that.

Last edited by DLively; 04/28/15 20:40.

A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: bmap_for_screen help [Re: DLively] #451124
04/28/15 20:51
04/28/15 20:51
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Originally Posted By: DLively
Code:
on_q = grab_screen(screen_map, 1, 1, "SV_VARS + SV_BMAPS");


You can't do this. There should be no brackets, when calling function on 'on_' key.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: bmap_for_screen help [Re: 3run] #451126
04/28/15 20:57
04/28/15 20:57
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline OP
Serious User
DLively  Offline OP
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
@3run: thank you for your help. It is appreciated.
As much as I knew that, I still had to try and exhaust all options before getting to the final conclusion. -- On the offchance that someone pointed me in the correct direction for such a thing (If it was even possible, though I knew it likely 98% wasn't) I would have been happy with that as well.

Any chance someone knows why grab_screen2 Doesn't work with on_z?

Last edited by DLively; 04/28/15 20:57.

A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1