making panel an entity

Posted By: JazzDude

making panel an entity - 04/04/10 20:56

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!
Posted By: Pappenheimer

Re: making panel an entity - 04/04/10 21:02

In Lite-C you could make a struct for this.
In c-script, maybe, I would load an empty level and create 'empty' entities, each with 'access' to a certain panel. I guess that's the easiest way, when you are used to think in the structure of the engine's entities, anyway.
Posted By: JazzDude

Re: making panel an entity - 04/04/10 21:26

I could probably do this in Flash with less trouble.
Posted By: EvilSOB

Re: making panel an entity - 04/05/10 06:50

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]
Code:
...
	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.


Posted By: JazzDude

Re: making panel an entity - 04/05/10 15:12

Thanks for the useful suggestions.
Posted By: DLively

Re: making panel an entity - 04/05/10 17:53

I know you dont want to use models for this but...
you can try this:

Code:
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 tongue
Posted By: JazzDude

Re: making panel an entity - 04/05/10 22:17

Thanks, Devon...I had considered that approach but I was trying to avoid using models.
Posted By: deianthropus

Re: making panel an entity - 04/06/10 00:18

Had you considered using sprites instead?
Posted By: JazzDude

Re: making panel an entity - 04/08/10 16:29

Yes, but not seriously. I may play with that approach a bit. See where it leads.

Thanks.
© 2024 lite-C Forums