|
Re: Panel.layer = lower than ent => below ent!?
[Re: Espér]
#276721
07/06/09 08:06
07/06/09 08:06
|
Joined: Jan 2004
Posts: 3,023 The Netherlands
Helghast
Expert
|
Expert
Joined: Jan 2004
Posts: 3,023
The Netherlands
|
it's already working... currently im making a pre-rendered game, using this technique. what you gotta do, i make the level's background transparent, and render the panel to a negative layer. If you want to see an example of this, add me on MSN, i'll show you now i made it work. I'm gonna post it in the showcase soon as well though (give or take a week). regards,
|
|
|
Re: Panel.layer = lower than ent => below ent!?
[Re: Helghast]
#276816
07/06/09 15:53
07/06/09 15:53
|
Joined: Mar 2008
Posts: 2,247 Baden Württemberg, Germany
Espér
OP
Expert
|
OP
Expert
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
|
really... it´s not working for me o.O
i just need a function to show 3D animated models.. WITH PARTICLES AND SHADERS.. above 2D panel-made maps ( for a 2D RPG with 3D Elements )..
Last edited by Espér; 07/06/09 20:08.
|
|
|
Re: Panel.layer = lower than ent => below ent!?
[Re: Espér]
#277186
07/08/09 08:22
07/08/09 08:22
|
Joined: Jan 2004
Posts: 3,023 The Netherlands
Helghast
Expert
|
Expert
Joined: Jan 2004
Posts: 3,023
The Netherlands
|
Im sorry, I dont have ICQ installed at home anymore, so i'll post this here then (brought the project from home to work to copy/paste the code :P) what you have to do in your main first is to tell the engine the background is transparent:
sky_color.red = 0;
sky_color.green = 0;
sky_color.blue = 0;
make sure to load a level after that ofcourse now, when creating a panel, make sure it's layer is set negative
STRING* tempcreateSTR = "#500";
// create a string that contains the image directory
str_cpy(tempcreateSTR, "./backgrounds/");
str_cpy(tempcreateSTR, my.string1);
// create bitmap from string
BMAP* tempBMP = bmap_create(tempcreateSTR);
// create a panel, and assign the bitmap created from the string to it.
PANEL* currentBGrender = pan_create("flags = SHOW;", -5);
currentBGrender.bmap = tempBMP;
I read the string of an entity (which is something like: myCurrentImage.tga), and use that to load it from the backgrounds folder, then display that into a dynamic panel i create. that's how I did it, really that's all... nothing strange, if you cant get it to work, i can send my project so you can see how I did it... hope that helps you! regards,
|
|
|
Re: Panel.layer = lower than ent => below ent!?
[Re: Helghast]
#277240
07/08/09 13:33
07/08/09 13:33
|
Joined: Mar 2008
Posts: 2,247 Baden Württemberg, Germany
Espér
OP
Expert
|
OP
Expert
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
|
that´s all i´ve done:
//=================================================================================================================================
// //
// DAS MAINSCRIPT //
// ^^^^^^^^^^^^^^ //
// //
//=================================================================================================================================
// //
// EINBINDEN DER UNTERORDNER UND SCRIPTS //
// """"""""""""""""""""""""""""""""""""" //
// //
//=================================================================================================================================
#define PRAGMA_PATH "Graphics\Characters"
#define PRAGMA_PATH "Graphics\Battlebacks"
#define PRAGMA_PATH "Data\Levels"
#include <acknex.h>
#include <default.c>
//=================================================================================================================================
// //
// FUNKTIONEN //
// """""""""" //
// //
//=================================================================================================================================
BMAP* testobjekt = "Mountainroad.png";
action debugging()
{
while(1)
{
my.pan += random(3)*time_step;
my.tilt += random(3)*time_step;
my.roll += random(3)*time_step;
wait(1);
}
}
//=================================================================================================================================
// //
// DAS MAINSCRIPT //
// """""""""""""" //
// //
//=================================================================================================================================
function main()
{
fps_max = 60;
d3d_antialias = 9;
video_set(1024,768,32,0);
video_window(vector(10,10,NULL),NULL,48,"Panel below models!");
screen_color.red = 0;
screen_color.green = 0;
screen_color.blue = 0;
sky_color.red = 0;
sky_color.green = 0;
sky_color.blue = 0;
level_load("leer.wmb");
wait(3);
error("before creating panel and entity");
PANEL* testerpanel = pan_create("bmap = testobjekt; flags = SHOW;", -1);
error("after creating panel");
ent_create("Gegner_Weißer Drachenreiter_stehen+4.tga", vector(0,0,0), debugging);
error("after creating entity");
//end of function
}
But Acknex crashes.. But after creating the panel... The last error ( after creating the entity) is not shown...
Last edited by Espér; 07/08/09 13:49.
|
|
|
Re: Panel.layer = lower than ent => below ent!?
[Re: Espér]
#278424
07/13/09 18:37
07/13/09 18:37
|
Joined: Jul 2007
Posts: 959 nl
flits
User
|
User
Joined: Jul 2007
Posts: 959
nl
|
Gegner_Weißer Drachenreiter_stehen+4.tga you cant use ...Ber[space]drachen... spaces always crashes here
"empty"
|
|
|
|