Problem with codes

Posted By: JGGamer

Problem with codes - 11/22/09 15:55

Following the manual I am applying these codes but I am not getting any results.

Code:
BMAP* image1 = "image1.pcx";

if (case)
{pan_setbmap(panel_image,1,1,image1);} //change image

MATERIAL* skin1 = "skin1.tga";

if (case)
{ent_mtlset(my,skin1,1);} //change material



Should these codes not work?
Posted By: delinkx

Re: Problem with codes - 11/23/09 03:18

MATERIAL definition controls the "lighting" properties of an entity or surface. u cant assign an image to that. usually the definition of material is the ambience, specular and diffuse lighting properties. see manual for MATERIAL definition.

instead you try this (not tested):

Code:
BMAP* bmpskin1 = "skin1.tga";

MATERIAL* mtlskin1 =
{
 skin1 = bmpskin1;
 ...
 ...

}

if (case)
{ent_mtlset(my,skin1,1);}



u can replace the "..." with other lighting properties.
Posted By: JGGamer

Re: Problem with codes - 11/24/09 01:36

Thanks, I'll try. Is the panel code correct?
Posted By: delinkx

Re: Problem with codes - 11/24/09 02:25

yes thats good.
Posted By: JGGamer

Re: Problem with codes - 11/25/09 03:26

Well I don't understand why it doesn't change.
By the way, I haven't tried your code yet. I will tomorrow. I just have a few minutes right now. Thanks
© 2024 lite-C Forums