Weapon/Player Skin
by Chris Mooney · in Torque Game Engine · 04/11/2007 (4:24 pm) · 2 replies
I posted this thread again (accidentally deleted the previous one - slowbrain day)
This thread relates to the resource posted by Chris \"C2\" Byars - "First/Third Person Different Weapon Models"
I have yet to implement the resource myself, but I can see the great enhancements it makes to the detail/control over first person weapon view, anyway.
The project I am working on uses a skin/model selection, so of course the hands on players are always different. As I understand the implementation of that resource, would require hands/arms to be exported in the weapon dts file.
So im trying to think of a way to replace the texture on the weapon DTS in accordance with the current skin the player has. A way communicate the skin change to the weapon dts and thus change the skin to fit that players selected skin.
For example: Player has urban camo skin assigned and decides to change to desert camo, the next time he picks up a weapon the texture on the arms (on the weapon dts) has changed too.
I know how having two textures on one dts is a problem, so I dont mind losing a little file space if it means having repeat weapon textures, just different arms.
Not to answer my own question but to throw it in there... perhaps something like..
as an example in "english thought code".
If anyone has any insight into the problem, I'd very much appreciate it, or if already implemented could explain their system? I look like a monkey scratching my head here :). Thanks for any help.
Chris
This thread relates to the resource posted by Chris \"C2\" Byars - "First/Third Person Different Weapon Models"
I have yet to implement the resource myself, but I can see the great enhancements it makes to the detail/control over first person weapon view, anyway.
The project I am working on uses a skin/model selection, so of course the hands on players are always different. As I understand the implementation of that resource, would require hands/arms to be exported in the weapon dts file.
So im trying to think of a way to replace the texture on the weapon DTS in accordance with the current skin the player has. A way communicate the skin change to the weapon dts and thus change the skin to fit that players selected skin.
For example: Player has urban camo skin assigned and decides to change to desert camo, the next time he picks up a weapon the texture on the arms (on the weapon dts) has changed too.
I know how having two textures on one dts is a problem, so I dont mind losing a little file space if it means having repeat weapon textures, just different arms.
Not to answer my own question but to throw it in there... perhaps something like..
if
%player.skin = ("data/shapes/player/desert");
set ak47.skin = ("data/shapes/ak47/desert");as an example in "english thought code".
If anyone has any insight into the problem, I'd very much appreciate it, or if already implemented could explain their system? I look like a monkey scratching my head here :). Thanks for any help.
Chris
About the author
#2
Thanks for help, I will give that a try and post back with my results :).
Chris
04/12/2007 (5:32 am)
Hey Tim,Thanks for help, I will give that a try and post back with my results :).
Chris
Torque Owner Tim Heldna
For a player.
%player.setSkinName("americanCamo");So just set up a switch statement that applies both textures when necessary. Store the skins as global variables, that way you can perform checks and ensure both player and weapon are using same texture skin.