How to change player texture in runtime?
by Corin · in Torque Game Engine · 05/13/2005 (4:46 am) · 2 replies
About the author
#2
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.
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.
Torque Owner Chris Labombard
Premium Preferred