Displaying models in the menu with non-default skin
Posted: Tue Jul 26, 2011 4:01 am
I'm working on a weapon selection in-game menu (resuming a mod project I haven't worked on in quite some time), and I need to display the same model twice but with different skins.
So I have two of these itemDefs in my menu:
itemDef
{
name he_model
type ITEM_TYPE_MODEL
(etc, etc)
asset_model "models/weapons2/grenade/grenade.MD3"
(etc etc)
}
By default, this displays the grenade model with its default skin. But for one of them I want to display it with a different skin (one is a high explosive grenade, the other is a smoke grenade).
I sort of chased it down to Item_Model_Paint() but how to get it to display other skins is kind of blowing my mind right now, I just have no idea how.
It seems like ent.hModel is given an integer number that corresponds to some magical hidden array of assets that the game loads at runtime in the order that the menu tries to display them. So the closest I have guessed so far is that ent.customSkin also has a corresponding magical hidden spot with a value and it's that value I need to change.. or something?
Or maybe I'm way off track.
Any ideas?
Thanks
So I have two of these itemDefs in my menu:
itemDef
{
name he_model
type ITEM_TYPE_MODEL
(etc, etc)
asset_model "models/weapons2/grenade/grenade.MD3"
(etc etc)
}
By default, this displays the grenade model with its default skin. But for one of them I want to display it with a different skin (one is a high explosive grenade, the other is a smoke grenade).
I sort of chased it down to Item_Model_Paint() but how to get it to display other skins is kind of blowing my mind right now, I just have no idea how.
It seems like ent.hModel is given an integer number that corresponds to some magical hidden array of assets that the game loads at runtime in the order that the menu tries to display them. So the closest I have guessed so far is that ent.customSkin also has a corresponding magical hidden spot with a value and it's that value I need to change.. or something?
Or maybe I'm way off track.
Any ideas?
Thanks