Setting a different skin
by Kevin Delval · in Torque Game Engine Advanced · 05/27/2009 (1:20 am) · 3 replies
Hello,
Currently I'm trying to bind a key to changing the skin of my player and while he seems to execute the code, the skin itself doesn't seem to change.
What I do in scripting right now is:
(in defaultbind.cs)
%player = ServerConnection.getControlObject();
%player.setSkinName( "second" );
echo(%player.getSkinName());
The two skins I'm using are called: base.arc.png and second.arc.png .
Anyone have any ideas why it isn't working properly?
Currently I'm trying to bind a key to changing the skin of my player and while he seems to execute the code, the skin itself doesn't seem to change.
What I do in scripting right now is:
(in defaultbind.cs)
%player = ServerConnection.getControlObject();
%player.setSkinName( "second" );
echo(%player.getSkinName());
The two skins I'm using are called: base.arc.png and second.arc.png .
Anyone have any ideas why it isn't working properly?
About the author
Torque 3D Owner Nicolas Buquet
Then, you can use "setSkinName" to change the skin to another.
That's how it worked in TGE.
In TGEA, it will work only the first time, because you material (and not texture, that's the difference between TGE and TGEA) contains "base."
But when the skin is changed, it doesn't contain anymore "base.", and so, the following calls to "setSkinName" will have no effect.
There are different resources around that modify this behaviour. Search for TGEA and setSkinName.
Nicolas Buquet
www.buquet-net.com/cv/
Edit : sorry, I just see that you don't have access to private parts, so you won't be able to modify these behavior because it requires change in the C++ source code.