Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 900 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Changing Three textures for one model ? #445428
09/09/14 10:18
09/09/14 10:18
Joined: Jan 2012
Posts: 108
G
gamers Offline OP
Member
gamers  Offline OP
Member
G

Joined: Jan 2012
Posts: 108
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...

Re: Changing Three textures for one model ? [Re: gamers] #445432
09/09/14 11:22
09/09/14 11:22
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
ent_getskin() and setskin() is the 2 keywords, in the manual - as I remember - there are examples.


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: Changing Three textures for one model ? [Re: sivan] #445444
09/09/14 14:13
09/09/14 14:13
Joined: Jan 2012
Posts: 108
G
gamers Offline OP
Member
gamers  Offline OP
Member
G

Joined: Jan 2012
Posts: 108
is there any example ???

Re: Changing Three textures for one model ? [Re: gamers] #445445
09/09/14 14:19
09/09/14 14:19
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
sivan gave you what you need... everything else is just basic programming.


POTATO-MAN saves the day! - Random
Re: Changing Three textures for one model ? [Re: Kartoffel] #445446
09/09/14 14:30
09/09/14 14:30
Joined: Jul 2014
Posts: 49
Romania,vaslui
A
AceX Offline
Newbie
AceX  Offline
Newbie
A

Joined: Jul 2014
Posts: 49
Romania,vaslui
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.

Last edited by AceX; 09/10/14 08:02.
Re: Changing Three textures for one model ? [Re: AceX] #445449
09/09/14 17:56
09/09/14 17:56
Joined: Jan 2012
Posts: 108
G
gamers Offline OP
Member
gamers  Offline OP
Member
G

Joined: Jan 2012
Posts: 108
thank you so much wink


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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