is there a mod with items that "stick"

like how you can stab a sawblade into a wall… why not stab spears in, ninja stars? knives?

is there such a thing?

It’s a model property set when the model is compiled, in its .qc script. Let’s look at the harpoon from Half-Life 2.



$keyvalues 
{
	prop_data
	{
		"base" "Metal.Small" 
	}
	physgun_interactions
	{
		"preferred_carryangles" "0 0 0"
		"onfirstimpact" "impale"
		"onlaunch" "spin_none"
		"damage" "none"
	}
} 


“preferred_carryangles” sets the model’s relative rotation (in this case, 0 0 and 0) while it’s being held by the gravity gun.
“onfirstimpact” defines what to do when the model strikes something - in this case, it’ll impale the object. This causes the harpoon/sawblade/etc to stick into walls or whatever it hits.
“onlaunch” defines what happens when the model’s launched from the gravity gun. In this case, it’s told to not spin. You can also use “spin_zaxis” to make it spin sideways while it flies (the sawblade uses that).

I recompiled the spy’s butterfly knife with these properties a while ago, and I was somewhat disappointed with the result. While it did stick in walls, it often went through the whole way and landed backwards. That seems to suggest that these properties don’t work well with smaller props. Ninja stars and knives would be launched fine, but they probably wouldn’t land well.

how do i access\where do i find these to edit their properties, i am familiar with lua even if i dont post online, but can i change their properties without lua

  • ive only used lua in hl2 once

You can’t edit these properties realtime, they’re set when the actual .mdl file is compiled and they’re stored in the model. Lua is unrelated.

You can only add these properties to a new model before it’s compiled, or decompile and recompile an existing model (you’d have to hex it).

ok, ill just leave it and hope for a mod then x-x

thx anyway