Jump to content
Sign in to follow this  
zyerasu

Problems with bullet impact

Recommended Posts

Hello,

I am making some traffic signs for this other project but now i came up against a problem that i cant solve.

During bullet impact my metal object sends debris and rocks to fly out of the object which ofcourse isn't normal for metal objects. Is there a way to fix it? I have tried to study default config.cpp files found from BIS files along with tutorials and BIS wiki but with no luck.

My current config.cpp (don't mind the comments...):

// CONFIG START
class CfgPatches {
class hum_trafficSigns {
	units[] = { // list all addon objects
		"Land_trafficSign_40",
		"Land_trafficSign_80",
		"Land_trafficSing_militaryArea",
		"Land_trafficSign_moose",
		"Land_trafficSign_rocks",
		"Land_trafficSign_turnL",
		"Land_trafficSign_turnR",
		"Land_trafficSign_reflectorStick"
	};
	weapons[] = {};
	requiredVersion = 0.100000;
	requiredAddons[] = {};
};
};

class CfgVehicleClasses {
class hum_trafficSignsClass {
	displayName = "hum's Traffic Signs"; // addon name in editor
};
};

class CfgVehicles {
class HouseBase; //*extern*

class House : HouseBase { // dont ask why
	class DestructionEffects; //*extern*
};

class Ruins; //*extern*

class Land_trafficSignsBase : House {
	armor = 150; // cannot be destroyed by bullets
	animated = false; // not animated
	mapSize = 0.1;
	icon = "iconStaticObject";
	scope = 2; // 2 = public (can be seen from editor)
	           // 1 = private
	accuracy = 0.2; // accuracy -> recognize type
	placement = "vertical";

	transportAmmo = 0;
	transportRepair = 0;
	transportFuel = 0;

	destrType = "destructtree"; // will fall like a tree

	class DestructionEffects {
		class DestroyPhase1 {	// wtf is happening here
			simulation = "destroy";
			type = "DelayedDestruction";
			lifeTime = 2.5;
			position = "";
			intensity = 1;
			interval = 1;
		};
	};
};

// All objects are listed below
class Land_trafficSign_40 : Land_trafficSignsBase { // uses defaults from class trafficsignbase
	model = "\hum_trafficSign\hum_trafficSigns_40.p3d"; // model location
	vehicleClass = "hum_trafficSignsClass"; // belongs to addon..
	displayName = "Sign Speedlimit 40"; // object name
};

class Land_trafficSign_80 : Land_trafficSignsBase {
	model = "\hum_trafficSign\hum_trafficSigns_80.p3d";
	vehicleClass = "hum_trafficSignsClass";
	displayName = "Sign Speedlimit 80";
};

class Land_trafficSign_militaryArea : Land_trafficSignsBase {
	model = "\hum_trafficSign\hum_trafficSigns_militaryArea.p3d";
	vehicleClass = "hum_trafficSignsClass";
	displayName = "Sign Military Area";
};

class Land_trafficSign_moose : Land_trafficSignsBase {
	model = "\hum_trafficSign\hum_trafficSigns_moose.p3d";
	vehicleClass = "hum_trafficSignsClass";
	displayName = "Sign Moose Warning";
};

class Land_trafficSign_rocks : Land_trafficSignsBase {
	model = "\hum_trafficSign\hum_trafficSigns_rocks.p3d";
	vehicleClass = "hum_trafficSignsClass";
	displayName = "Sign Falling Rocks Warning";
};

class Land_trafficSign_turnL : Land_trafficSignsBase {
	model = "\hum_trafficSign\hum_trafficSigns_turnL.p3d";
	vehicleClass = "hum_trafficSignsClass";
	displayName = "Sign S-turn Left";
};

class Land_trafficSign_turnR : Land_trafficSignsBase {
	model = "\hum_trafficSign\hum_trafficSigns_turnR.p3d";
	vehicleClass = "hum_trafficSignsClass";
	displayName = "Sign S-turn Right";
};

class Land_trafficSign_reflectorStick : Land_trafficSignsBase {
	model = "\hum_trafficSign\hum_trafficSigns_reflectorStick.p3d";
	vehicleClass = "hum_trafficSignsClass";
	displayName = "Sign Reflection Stick";

	armor = 5; // can be shot down		
	destrType = "destructtree"; // will fall like a tree
	class DestructionEffects;
	};
};
};

// CONFIG END

.bisurf file:

rough = 0.1;
dust = 0.1;
bulletPenetrability = 20;
soundEnviron = "metal";
isWater = false;
thickness = 10;
density = 2750;
friction = 0.9;
restitution = 0;
impact = "Impact_Metal";
soundHit = "metal";

Share this post


Link to post
Share on other sites

First make sure you applied the correct material (minimal rvmat (no defined render stages) that links a bisurf file) to your structure (face properties) in the fire geometry lod.

Second, try "Hit_Metal" for the impact effect instead of "Impact_Metal", works over here.

Share this post


Link to post
Share on other sites
First make sure you applied the correct material (minimal rvmat (no defined render stages) that links a bisurf file) to your structure (face properties) in the fire geometry lod.

Second, try "Hit_Metal" for the impact effect instead of "Impact_Metal", works over here.

Thanks! "Hit_Metal" seems to work just fine and i don't even know where i actually got that "Impact_Metal" (i had already tried metal and so worth and i think i found this one from some default BIS .cpp file?).

And now another question. How can i make my object to have no impact effects at all? Now it just seems to use some default parameters and throw rocks out of the model.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×