Changing Three textures for one model ?

Posted By: gamers

Changing Three textures for one model ? - 09/09/14 10:18

Hi, I want to change the model's external texture when pressing a key between 3 bitmaps ? Is there any way to do this? Please give me an example. Thanks...
Posted By: sivan

Re: Changing Three textures for one model ? - 09/09/14 11:22

ent_getskin() and setskin() is the 2 keywords, in the manual - as I remember - there are examples.
Posted By: gamers

Re: Changing Three textures for one model ? - 09/09/14 14:13

is there any example ???
Posted By: Kartoffel

Re: Changing Three textures for one model ? - 09/09/14 14:19

sivan gave you what you need... everything else is just basic programming.
Posted By: AceX

Re: Changing Three textures for one model ? - 09/09/14 14:30

Code:
var skin_num;

//We need to increase the skin number

function set_skinnum()
{
if(skin_num <= 3)
{
skin_num +=1;
}
}
//Skin Bitmaps

BMAP* FirstSKIN = <skin1.bmp>;
BMAP* SecondSKIN = <skin2.bmp>;
BMAP* ThirdSKIN = <skin3.bmp>;

//Now,we will assign a skin to the model
function set_entskin(ENTITY* ent)
{
while(skin_num == 1)
{
ent_setskin(ent,FirstSKIN,1);
}
while(skin_num == 2)
{
ent_setskin(ent,SecondSKIN,1);
}
while(skin_num == 3)
{
ent_setskin(ent,ThirdSKIN,1);
}
}
//Assign set_entskin() to your entity

//Now you need to call set_skinnum() in main() function
function main()
{
...
on_e = set_skinnum;
...
}



Check the manual firstly,and if you don't find what do you want ask in forum.
Posted By: gamers

Re: Changing Three textures for one model ? - 09/09/14 17:56

thank you so much wink
© 2024 lite-C Forums