Paintable custom physics models
Quote from Rorius on February 7, 2012, 6:34 pmIve been using sdk for a couple of years now but I have stumbled upon an issue thats holding my progress back. I have made a custom physics model that I wanted to have the player paint similar to the cubes or turrets in the game. I straight away thought to use a prop_physics_paintable but found that these props only get the effect of the paint, bounce around or slide. prop_physic props get tinted a colour when their painted but dont get the effect of the paint. I would like to have a visual effect to go along with the paint powers, is there any way around this issue or am I missing something? any help would be greatly appreciated.
Ive been using sdk for a couple of years now but I have stumbled upon an issue thats holding my progress back. I have made a custom physics model that I wanted to have the player paint similar to the cubes or turrets in the game. I straight away thought to use a prop_physics_paintable but found that these props only get the effect of the paint, bounce around or slide. prop_physic props get tinted a colour when their painted but dont get the effect of the paint. I would like to have a visual effect to go along with the paint powers, is there any way around this issue or am I missing something? any help would be greatly appreciated.
Quote from ChickenMobile on February 7, 2012, 7:22 pmWhat valve did was add different skins for each type of gel it was painted with. You will need to add different skins for your model.
- Code: Select all
IDST1 Bq??props/metal_box.mdl
mdlkeyvalue
{
prop_data {
"base" "Metal.small" }
}
props/metal_box.mdl Metal_Box static_prop default @idle idle ACT_IDLE Body metal_box metal_box_skin001 metal_box_skin002 metal_box_skin003 metal_box_skin004 metal_box_skin005 metal_box_bounce metal_box_speed metal_box_skin001_bounce metal_box_skin001_speed metal_box_skin002_bounce metal_box_skin002_speed modelsprops/As you can see for a normal cube it has the skins listed inside the .mdl file. The way these change would probably be done through scripts that are 'hard-coded' into the game.
You could always use the OnPainted() output and change the skin manually but you will only be able to have 1 gel painting the cube, otherwise it will be painted the wrong skin.
What valve did was add different skins for each type of gel it was painted with. You will need to add different skins for your model.
- Code: Select all
IDST1 Bq??props/metal_box.mdl
mdlkeyvalue
{
prop_data {
"base" "Metal.small" }
}
props/metal_box.mdl Metal_Box static_prop default @idle idle ACT_IDLE Body metal_box metal_box_skin001 metal_box_skin002 metal_box_skin003 metal_box_skin004 metal_box_skin005 metal_box_bounce metal_box_speed metal_box_skin001_bounce metal_box_skin001_speed metal_box_skin002_bounce metal_box_skin002_speed modelsprops/
As you can see for a normal cube it has the skins listed inside the .mdl file. The way these change would probably be done through scripts that are 'hard-coded' into the game.
You could always use the OnPainted() output and change the skin manually but you will only be able to have 1 gel painting the cube, otherwise it will be painted the wrong skin.
Quote from Rorius on February 8, 2012, 12:02 amDamn, I feared that it may have been hard coded. Ok well I'll give some of those a try, thanks for the help, I'll post any results i find here.
Damn, I feared that it may have been hard coded. Ok well I'll give some of those a try, thanks for the help, I'll post any results i find here.
