|
making panel an entity
#318078
04/04/10 20:56
04/04/10 20:56
|
Joined: Sep 2003
Posts: 733 Whitefish, Montana
JazzDude
OP
User
|
OP
User
Joined: Sep 2003
Posts: 733
Whitefish, Montana
|
I'm messing with a card game idea. Is it possible to make a panel (the card), an entity that can have the attributes of layer, pos_x, and pos_y, that can be controlled by a function that would place it on top of, or beside, other cards?
I could make the cards models, but I'd like to use panels if it is possible.
And Happy Easter everyone!
Last edited by JazzDude; 04/04/10 20:56.
|
|
|
Re: making panel an entity
[Re: JazzDude]
#318096
04/05/10 06:50
04/05/10 06:50
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
Here is some LITE_C code Ive been working on recently. Its not exact to what you want, but I'll take another look at it tonite. To make it c-script friendly and give you more control over it... [quote]
...
ENTITY* panel_entity = ent_create("panel1.mdl", NULL, NULL);
test_pan.target_map=bmap_createblack(test_pan.size_x, test_pan.size_y, 32);
ent_setskin(panel_entity, test_pan.target_map, 1);
...
this plants the panel output onto the skin of a model, provided I give it a double-sided-mapping model. [quote] [EDIT] Sorry guys, but my code revolves around "target_map", and that doesnt appear available in c-script.
Last edited by EvilSOB; 04/05/10 16:02.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: making panel an entity
[Re: JazzDude]
#318167
04/05/10 17:53
04/05/10 17:53
|
Joined: Apr 2005
Posts: 1,988 Canadian, Eh
DLively
Serious User
|
Serious User
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
|
I know you dont want to use models for this but... you can try this:
entity Ace_of_spades
{
type = <space_ace.mdl>;
layer = 36;
view = camera;// Important
x = 50;
y = 10;
z = 10;
}
panels are much like entities. so within your code, you would simply use: ace_of_spade_pan.layer = 36; /// FOR EXAMPLE to bring it to the front, if there are cards behind it. ------------------------------ Not exactly sure what your trying to do, exactly; But I just wanted to try and help
|
|
|
|