|
Model on top of the panel
#225632
09/05/08 13:21
09/05/08 13:21
|
Joined: Aug 2006
Posts: 155
RyuMaster
OP
Member
|
OP
Member
Joined: Aug 2006
Posts: 155
|
Hi everyone! ------------------------------------------------------------------------------ Firstly, I would like to have some image stretched as background and visible all the time. I think, using the panel is the best, right? But, if I create panel like this: PANEL* background = { bmap = "point1.bmp"; pos_x = 0; pos_y = 40; layer = 0; flags = VISIBLE; }
then, 3D character entity becomes invisible all the time. I create entity this way: ent_create("robotic.mdl", vector(300,0,0), player_walk); How can I make this entity visible? Setting pannel's layer value to negative one hides panel at all, even at the empty scene. And how can I modifie layer of characters entity to make it on top of the panel? Or there is some better way around this? ------------------------------------------------------------------------------ Regards, Konstantin.
Last edited by RyuMaster; 09/05/08 13:26.
What kills me not, that makes me stronger.
***Working on RPG/RTS***
|
|
|
Re: Model on top of the panel
[Re: asd]
#225654
09/05/08 15:30
09/05/08 15:30
|
Joined: Jun 2008
Posts: 428
Rasch
Senior Member
|
Senior Member
Joined: Jun 2008
Posts: 428
|
You want something like this? sorry for paint xD if not add this to your player_movement my.ZNEAR = on;
Last edited by Rasch; 09/05/08 15:31.
|
|
|
Re: Model on top of the panel
[Re: RyuMaster]
#225697
09/05/08 19:24
09/05/08 19:24
|
Joined: Aug 2006
Posts: 155
RyuMaster
OP
Member
|
OP
Member
Joined: Aug 2006
Posts: 155
|
It is not helping =( I'll try explaining one more time. I have panel witch I want to use as a background. It is 1024X768px, all over the screen. And I want to have 3D model, moving on top of the panel. But... When I create panel, it hides my model behind it. How can I make model appear above the panel? Does it has something to do with layers? Or maybe I can use something else, not panel?
Last edited by RyuMaster; 09/05/08 19:25.
What kills me not, that makes me stronger.
***Working on RPG/RTS***
|
|
|
Re: Model on top of the panel
[Re: Rasch]
#225716
09/05/08 20:36
09/05/08 20:36
|
Joined: Jul 2007
Posts: 959 nl
flits
User
|
User
Joined: Jul 2007
Posts: 959
nl
|
yeah you are right about the layer read layer on the manaul
* The layer parameter can only be set in a definition. For changing it during gameplay, use layer_sort.
* A7.06 Panels, texts, and view entities with a positive layer value are placed above any view; with a negative layer value they are placed below any view. This can be used to define an image visible in the background of a view that has no sky and a transparent sky_color.
* A7.08 The view layer parameter can be evaluated in a material effect or shader through the fLayer variable.
"empty"
|
|
|
Re: Model on top of the panel
[Re: flits]
#225738
09/05/08 21:49
09/05/08 21:49
|
Joined: Aug 2006
Posts: 155
RyuMaster
OP
Member
|
OP
Member
Joined: Aug 2006
Posts: 155
|
Thanks a lot for trying to help! with a negative layer value they are placed below any view Yep, I have read this and jumped writing "layer = -1", but this worked not, and then I started this topic. Negative values just causes panel to disappear, and I have latest commercial build, 7.10 I think. Using sprites was what I made from very start. But sprite is in 3D world, acts as object. How can I make it always stay on screen, 1024X768px, because it just weirdly stands somewhere in 3D world... Lots of problems with positiong it before camera, or there is some easy solution? And also, 3D objects, while moving, sometimes collides with sprite and e.t.c.... HMMMMM....
What kills me not, that makes me stronger.
***Working on RPG/RTS***
|
|
|
Re: Model on top of the panel
[Re: RyuMaster]
#225746
09/05/08 21:59
09/05/08 21:59
|
Joined: Sep 2003
Posts: 733 Whitefish, Montana
JazzDude
User
|
User
Joined: Sep 2003
Posts: 733
Whitefish, Montana
|
Maybe using a view entity would help. I'm using A6 so I'm just guessing. According to the manual View Entities are attached to a VIEW, and thus are globally available even if no level is loaded.
|
|
|
Re: Model on top of the panel
[Re: RyuMaster]
#225750
09/05/08 22:08
09/05/08 22:08
|
Joined: Jun 2008
Posts: 428
Rasch
Senior Member
|
Senior Member
Joined: Jun 2008
Posts: 428
|
try it with a view entity BMAP pic_1 = "pic.pcx";
PANEL plane =
{
pos_x = 0; pos_y = 0;
bmap = pic_1;
layer = 1;
flags = VISIBLE;
}
ENTITY ent1 =
{
type = "soldier.mdl";
layer = 2; // display above view entities with layer 1
flags = VISIBLE; client_id = camera; // same camera parameters as the default view
x = 200; // place 100 quants ahead of the view
y = 0; // 50 to the right
z = 0; // and center vertically
} edit: jazz was faster xD
|
|
|
Re: Model on top of the panel
[Re: RyuMaster]
#225756
09/05/08 22:22
09/05/08 22:22
|
Joined: Aug 2006
Posts: 155
RyuMaster
OP
Member
|
OP
Member
Joined: Aug 2006
Posts: 155
|
Oh, I was trying to do it from very start, but failed. OK, here were the problems with VIEW entities. 1. It is not visible.ent_create("robotic.mdl", vector(300,0,0), player_walk); - IS VISIBLE ON SCREEN -- IS VISIBLEENTITY ent1 = { type = "robotic.mdl"; layer = 2; // display above view entities with layer 1 flags = VISIBLE; client_id = camera; // same camera parameters as the default view x = 300; // place 100 quants ahead of the view y = 0; // 50 to the right z = 0; // and center vertically } - IS NOT VISIBLEBut what is the difference? Why second one is not visible at all? I create it at the same place, correct? This definition is positioned at the very top of the script, so it should run. Besides, panel creation, which as above in the script, works fine. So, I have no idea where is the problem... 2. How can I attach action to entity created this way?It is een possible?
What kills me not, that makes me stronger.
***Working on RPG/RTS***
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|