Game Development Community

Setting multiple skins

by Erik Madison · in Torque Game Engine · 04/06/2003 (1:57 pm) · 2 replies

I understand the usage of %obj.setSkin() to change an item/players skin. However, many of my items use 2+ skins. Can these items change their skins as well? ie, players may have body.png and head.png. When I change those in script, I need to change both.

#1
04/06/2003 (6:43 pm)
If you have all the skins on your model named base.head.png base.body.png etc. then you make new skins red.body.png, red.head.png etc. when you use the %obj.setSkinName(red) it will change all the skins to the red tagged skins. by default they will use the base.tagged skins and can be switched at any time.
#2
04/07/2003 (6:23 pm)
Ah cool :) I noticed other folks demos had done that, and I never could figure out why they used triple names for their skins. Makes perfect sense now, thanks!