Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,507 guests, and 12 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
ent_setskin #187500
03/08/08 02:10
03/08/08 02:10
Joined: Feb 2006
Posts: 324
Germany
M
maybenew Offline OP
Senior Member
maybenew  Offline OP
Senior Member
M

Joined: Feb 2006
Posts: 324
Germany
hi

after a intensive research on the board and another topic which got no replies, I have to ask you lot directly:

what is the matter with ent_setskin?

generally speaking it works like described... but there are a few exceptions to that... a lot of them acutually...

- i am not able to load a texture which hasnt been cached before... example: test.bmp is in root-folder/savedir/path/wrs (tried all)... i now call ent_setskin (my, "test.bmp", 1); and nothing happens... BUT: as soon as i add a Bmap object it works:
Code:
 Bmap TEST_BMP, "test.bmp";
Action Skinchange { ent_setskin (my, TEST_BMP, 1); }



- i can only change ONE skin ONE time whether i call ent_cloneskin or ent_clone or both or none, i can only change one skin.

- the second time i use the ent_setskin command on the same model it does nothing more than to erase the skin it is executed on making the target skin completely see-trough (looks like the alpha channel got erased or cleared to black)

- and here is the worst thing: mipmaps are not affected! only the original texture is changed... as soon as the camera is moved far enough from the model, the mipmaps appear and show the old skins!

- ent_cloneskin kind of improves things a little, and increases the chance to get the skin acutally changed to the new file... but still no change mipmaps and no change of further skins

- the first skin i change is a BMP file, this works okay except the mipmap thing, the second one is a TGA with alphachannel, this i did not get to work so far! it also wont work when called ent_Setskin is called first to cchange the TGA skin...

- another thing: i am not trying to switch between formats and change a BMP to a TGA with 32bits, i only want BMP->BMP, TGA 32bit -> TGA 32bit

my model is a standard bones animated MDL7 file created with the latest public MED, it contains a total of 9 skins, the last 2 used as render targets for 2 different views and the second skin is empty for now. the model has bones and around 60 frames. just to give you the parameters of the test.

can you please help! this command is one of the major reasons we upgraded to A7 and now we cannot get it to work properly!

Last edited by maybenew; 03/08/08 02:21.
Re: ent_setskin [Re: maybenew] #187501
03/10/08 13:22
03/10/08 13:22
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
ent_setskin is a simple function, nothing special to it. You can change any bitmap as often as you want. Only thing to care about is that you can't change the transparency type of the entity this way, i.e. make a transparent entity intransparent or vice versa.

Re: ent_setskin [Re: jcl] #187502
03/10/08 14:20
03/10/08 14:20
Joined: Feb 2006
Posts: 324
Germany
M
maybenew Offline OP
Senior Member
maybenew  Offline OP
Senior Member
M

Joined: Feb 2006
Posts: 324
Germany
Quote:

Only thing to care about is that you can't change the transparency type of the entity this way, i.e. make a transparent entity intransparent or vice versa.




okay, i avoided to do that, but it still does not work...

Re: ent_setskin [Re: maybenew] #200007
04/02/08 05:54
04/02/08 05:54
Joined: Feb 2006
Posts: 324
Germany
M
maybenew Offline OP
Senior Member
maybenew  Offline OP
Senior Member
M

Joined: Feb 2006
Posts: 324
Germany
I still have this problem:
I cannot change a TGA Skin using ent_skin!! The skin simply becomes completely see-through!

Re: ent_setskin [Re: maybenew] #200011
04/02/08 06:55
04/02/08 06:55
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
When you can see through a skin but don't want to, there are 3 things to check first: The content of the alpha channel, the MDL material of the skin (if it has any), and the entity's transparency itself. If it happens after skin changing, chances are that maybe the previous skin was transparent but the current one isn't, or vice versa.

Re: ent_setskin [Re: jcl] #200207
04/02/08 23:47
04/02/08 23:47
Joined: Nov 2004
Posts: 862
Australia
DavidLancaster Offline
User
DavidLancaster  Offline
User

Joined: Nov 2004
Posts: 862
Australia
Hi JCL

I've been running into some issues with ent_setskin too, here's a demo I uploaded:

http://www.rebelplanetcreations.com/jcl/jclsetskinbug.rar

The model is 2 boxes, each box has a different skin.

ent_setskin works fine for the first skin but when I use it for the second skin the entire uv disappears in game. This is the line I'm using:

ent_setskin(you,bmap_createblack(32,32,24),2);

Any advice?

Thank you!

David

Re: ent_setskin [Re: DavidLancaster] #200253
04/03/08 09:07
04/03/08 09:07
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Yes, that was indeed a bug. The bitmap was set, but marked as not used in the UV set - that's why the UV disappears. This will be fixed in the next update. Here's the workaround:

BMAP* newskin = bmap_createblack(32,32,24);
newskin->flags |= (1<<25);
ent_setskin(you,newskin,2);

Re: ent_setskin [Re: jcl] #200319
04/03/08 14:32
04/03/08 14:32
Joined: Feb 2006
Posts: 324
Germany
M
maybenew Offline OP
Senior Member
maybenew  Offline OP
Senior Member
M

Joined: Feb 2006
Posts: 324
Germany
is there a way to work around this in C-Script?

Re: ent_setskin [Re: maybenew] #200449
04/04/08 06:34
04/04/08 06:34
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Unfortunately no, because there is no direct way to access the flags element in C-Script. I'm not sure that this was the reason of your problem anyway - your problem description sounds different. But you can send or upload your project also and I'll check.

Re: ent_setskin [Re: maybenew] #210760
06/12/08 17:57
06/12/08 17:57
Joined: Feb 2002
Posts: 288
California, USA
J
jaknine Offline
Member
jaknine  Offline
Member
J

Joined: Feb 2002
Posts: 288
California, USA
This is the same problem I'm having now with ent_setskin. See my post here for details and screen shots.


Moderated by  old_bill, Tobias 

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