Game Development Community

Texture-Swapping

by Chris Ushko · in Artist Corner · 11/21/2005 (2:23 pm) · 1 replies

Does anyone know how to do this? I read that you need to animate the image swap in Blender and export it through something called an .IFL file, though I can't find any resources on the topic. Are there any tutorials on how to do this anywhere?

#1
11/22/2005 (5:51 pm)
If you want to swap one set of textures for another (for example for red/blue team play) it's pretty easy in stock TGE 1.3.
(someone correct me if i'm misleading)

here's how you'd go about switching between say red and blue armour.

name your red armour texture "base.armour.png",
and name your blue armour texture "blue.armour.png".

the "base" in the first one is required.
you can use a different word than "armour", but it has to be the same word for both textures.

use base.armour.png in your DTS model.

then in script you can switch to blue via

%player.setSkinName('blue');
and switch back to red via
%player.setSkinName('base');

- be sure to use single-quotes instead of double-quotes there.


furthermore,
say you also want to have the skin change color.
you would just have two more textures with special names:
"base.skin.png" - for the red skin
"blue.skin.png" - for the blue skin.

the call to setSkinName() will switch the texture of both the armour and the skin.


if you want to be able to independantly control the texture of the armour and the texture of the skin, it's more difficult and you'll need to use a resource.
i'm looking in to that right now and when i find the most modern one i'll let you know.