1 registered members (AndrewAMD),
1,280
guests, and 2
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Please help me I am dumb I guess
#307704
01/31/10 02:44
01/31/10 02:44
|
Joined: Jan 2010
Posts: 13 USA
The_Unknown_Game
OP
Newbie
|
OP
Newbie
Joined: Jan 2010
Posts: 13
USA
|
okay so I am guessing I'm dumb cause I can't figure out how to make the black in a window transparent to show the layer 1 which the window is on layer 2 is there a way to do it if so can some one show me a code snip or explain really well to me
and thank you in advance for your help
USE FOR GAME DEV. GameStudio A7 7.82.3 pro 3D Max 9 for Modeler Adobe PhotoShop CS4 for art Brain for thinking Win XP ser 2 pent 4 3000 mhz 1 GB Ram ATI Radeon 9600 256 mb
|
|
|
Re: Please help me I am dumb I guess
[Re: Widi]
#307707
01/31/10 03:16
01/31/10 03:16
|
Joined: Jan 2010
Posts: 13 USA
The_Unknown_Game
OP
Newbie
|
OP
Newbie
Joined: Jan 2010
Posts: 13
USA
|
ok i was just trying to make my scrolling image with the black be transparent in my little window on my game screen but i guess i cant so no i have to decide on a new method and rewrite a lot of my code oh boy but thank you tho i guess this engine can't do everything lol oh well I'm going to have to look for a new one cause if it can't do something like that its not worth it i guess
USE FOR GAME DEV. GameStudio A7 7.82.3 pro 3D Max 9 for Modeler Adobe PhotoShop CS4 for art Brain for thinking Win XP ser 2 pent 4 3000 mhz 1 GB Ram ATI Radeon 9600 256 mb
|
|
|
Re: Please help me I am dumb I guess
[Re: The_Unknown_Game]
#307713
01/31/10 04:24
01/31/10 04:24
|
Joined: Dec 2008
Posts: 1,660 North America
Redeemer
Serious User
|
Serious User
Joined: Dec 2008
Posts: 1,660
North America
|
Umm, you can set the black parts of your panels to be transparent. Like Widi said, just write "flags = OVERLAY;" into your panel definition.
EDIT: For future reference, The_Unknown_Game: before you ask simple questions like this, look for answers in the User's Manual. If your copy of Gamestudio didn't come with a manual (for whatever reason), just use the online manual, which can be found on the side bar in this forum. Thank you.
Last edited by Redeemer; 01/31/10 04:28.
|
|
|
Re: Please help me I am dumb I guess
[Re: Redeemer]
#307719
01/31/10 08:23
01/31/10 08:23
|
Joined: Jan 2010
Posts: 13 USA
The_Unknown_Game
OP
Newbie
|
OP
Newbie
Joined: Jan 2010
Posts: 13
USA
|
okay let me try to explain this in easier terms where you all might under stand ok like the window not a panel like the window in the lite-c workshops #5 example #2 the one with the altitude is the a way to make that black transparent and if you say to do flags = OVERLAY | SHOW; then don't bother answering me cause then u don't know what i am talking about and need to do that workshop your self to understand what i mean by a window on the game screen but if you do know what i am talking about then great and you know how to make the bitmap black transparent the that is even better and here is some of my code to explain what i am trying to do
PANEL* sample_pan =
{
layer = 2;
// THIS IS A WINDOW BELOW I NEED TO MAKE TRANSPARENT WITH BLACK RGB 0,0,0
window (0, 500, 800, 50, "select.png", 0, select);
flags = OVERLAY | SHOW; // OVERLAY DOESN'T MAKE THE BLACK IN THE WINDOW TRANSPARENT
}
ok there maybe that will help you guys understand now if it was a normal panel then yes " flags = OVERLAY | SHOW; " would work but not for the window that is why i need help
|
|
|
Re: Please help me I am dumb I guess
[Re: The_Unknown_Game]
#307777
01/31/10 14:55
01/31/10 14:55
|
Joined: Apr 2006
Posts: 737 Ottawa, Canada
Ottawa
User
|
User
Joined: Apr 2006
Posts: 737
Ottawa, Canada
|
Hi!
You have created a window in your panel.
Now you have to put something larger that the window behind it and write the code to move this bitmap
Look at the compass example.
Hope this helps! Ottawa Ver 7.86.2 Pro and Lite-C
|
|
|
Re: Please help me I am dumb I guess
[Re: Widi]
#307806
01/31/10 16:20
01/31/10 16:20
|
Joined: Apr 2006
Posts: 737 Ottawa, Canada
Ottawa
User
|
User
Joined: Apr 2006
Posts: 737
Ottawa, Canada
|
Hi! Here's a code snip. You will have to draw a bitmap with your Draw program to make it work.
///////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////
////////////////////// ---- my folders
#define PRAGMA_PATH "..\\Models";
#define PRAGMA_PATH "..\\des_tga";
#define PRAGMA_PATH "..\\des_pcx";
#define PRAGMA_PATH "..\\panels";
//
// Global variables
BMAP* clr_strip = "yourbmap.pcx"; // make a bitmap that's 596x76
var compass_x = 0; // horizontal
var compass_y = 0; // vertical
// Panels
PANEL* SANTE = {
// bitmap clr_strip is 596x76
// the window must be smaller than the bitmap clr_strip
// The visible part is 180 x 60
// the function show_panel modifies the values of compass_x or _y : this creates the movement
//
//
pos_x = 100;
pos_y = 375;
layer = 2;
window (15,14,180,60,clr_strip,compass_x,compass_y);
digits (-60,-10, "compass_x = %.0f",*,1, compass_x); // to follow the values ... to be removed after testing
flags = SHOW; //| OVERLAY not needed here
}
// functions
function show_panel ()
{
var up = 0;
var down = 100;
compass_x = 0;
// move the bmap from left to right.....
while (1)
{
if (compass_x >= 100)
{
down = 100;
// up becomes down
while (down != 0)
{
compass_x -= 5 ;
down -= 1;
wait (1) ;
}
}
if (compass_x <= 0)
{
up = 0 ;
// down becomes up
while (up <= 99)
{
compass_x += 5 ;
up += 1;
wait (1) ;
}
}
wait (1) ;
}
}
//---------------------------
function main()
{
vec_set(screen_size,vector(800,600,0));
vec_set(screen_color,vector(50,1,1)); // dark blue
vec_set(sky_color,vector(50,1,1)); // dark blue
video_window(NULL,NULL,0,"My New Game");
level_load("");
show_panel ();
}
Hope this helps! Ottawa Ver 7.86.2 Pro and Lite-C
|
|
|
Re: Please help me I am dumb I guess
[Re: Widi]
#307908
01/31/10 20:08
01/31/10 20:08
|
Joined: Jan 2010
Posts: 13 USA
The_Unknown_Game
OP
Newbie
|
OP
Newbie
Joined: Jan 2010
Posts: 13
USA
|
ok so i tried to set the alpha to 0 but i get an error can anyone show me how to set the alpha to 0 just a little code snip or really good explain would help thank you
USE FOR GAME DEV. GameStudio A7 7.82.3 pro 3D Max 9 for Modeler Adobe PhotoShop CS4 for art Brain for thinking Win XP ser 2 pent 4 3000 mhz 1 GB Ram ATI Radeon 9600 256 mb
|
|
|
Re: Please help me I am dumb I guess
[Re: The_Unknown_Game]
#307911
01/31/10 20:19
01/31/10 20:19
|
Joined: Mar 2009
Posts: 112 Germany
KDuke
Member
|
Member
Joined: Mar 2009
Posts: 112
Germany
|
Thats not made with a code snippet. You do it in an image manipulation program like GIMP or Photoshop. Just add an alpha channel to the image and use the eraser to remove everything you want to have transparent.
Using A7 Free Click and join the 3dgs irc community! Room: #3dgs
|
|
|
|