Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 20:05
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
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
3 registered members (7th_zorro, AndrewAMD, TedMar), 1,306 guests, and 4 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
Page 1 of 3 1 2 3
Model on top of the panel #225632
09/05/08 13:21
09/05/08 13:21
Joined: Aug 2006
Posts: 155
R
RyuMaster Offline OP
Member
RyuMaster  Offline OP
Member
R

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:

Quote:
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:

Quote:
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: RyuMaster] #225653
09/05/08 15:25
09/05/08 15:25
Joined: Aug 2008
Posts: 55
A
asd Offline
Junior Member
asd  Offline
Junior Member
A

Joined: Aug 2008
Posts: 55
try:
Code:
set(ENTITY* ent,VISIBLE);


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 Offline
Senior Member
Rasch  Offline
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
R
RyuMaster Offline OP
Member
RyuMaster  Offline OP
Member
R

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: RyuMaster] #225711
09/05/08 20:22
09/05/08 20:22
Joined: Jun 2008
Posts: 428
Rasch Offline
Senior Member
Rasch  Offline
Senior Member

Joined: Jun 2008
Posts: 428
you could create it as a Sprite with ent_create and move it behind the entity smile

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
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
yeah you are right about the layer read layer on the manaul

Code:
    *   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
R
RyuMaster Offline OP
Member
RyuMaster  Offline OP
Member
R

Joined: Aug 2006
Posts: 155
Thanks a lot for trying to help!

Quote:
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 Offline
User
JazzDude  Offline
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
Quote:
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 Offline
Senior Member
Rasch  Offline
Senior Member

Joined: Jun 2008
Posts: 428
try it with a view entity

Code:
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
R
RyuMaster Offline OP
Member
RyuMaster  Offline OP
Member
R

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.

Quote:
ent_create("robotic.mdl", vector(300,0,0), player_walk); - IS VISIBLE ON SCREEN
-- IS VISIBLE

Quote:
ENTITY 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 VISIBLE

But 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***
Page 1 of 3 1 2 3

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