Game Development Community

How to change player texture in runtime?

by Corin · in Torque Game Engine · 05/13/2005 (4:46 am) · 2 replies


#1
05/13/2005 (4:46 am)
There's a resource for it. Google it.
#2
05/13/2005 (4:50 am)
Hi Juan,

AIplayers and some other objects may use a method called SetSkinName. It's useful to change textures. The only condition is that your main player's texture must be called base.something.png.

So you have, for a soldier:
base.soldier.png ---> normal texture
wounded.soldier.png --> blood is difficult to clean! :)

Then it's just a matter of calling %obj.setSkinName(wounded);

Good luck.