Creating Weapon Ironsights

From Obsidian Conflict Wiki
Jump to: navigation, search


Obsidian Conflict allows create custom ironsights for custom weapons. After configurate your button bindings, you can use them later in game. Also, in the next version of Obsidian Conflict it will be useful, because it will give you more precision to your attacks.

How to configure it

For add ironsights for your custom weapon, go to Obsidian Conflict and load a map with your weapon. Then, deploy the console and type cl_ironsight_test_wpn_offset 1 (you will need sv_cheats 1 to use it) to enable the ironsight configuration mode. Select your weapon and use the ironsight. From this moment, start using the following commands that are listed at bottom until you get the position you want. Copy the X,Y and Z values, set cl_ironsight_test_wpn_offset to 0 and exit the game.

Now go to the obsidian/scripts/customweapons folder and open the script of your custom weapon.

After the first values (normally after "csviewmodel" "1") maybe you will see the following (if not, paste it):

"ironsightoffset"  //Coordinates for the ironsights
		"x"   "-7.00"
		"y"   "6.10"
		"z"   "2.90"

Remplace the default values for the yours and save the file.

Now when you are in the mod, when you activate the ironsights of your weapon, it should be in the position you wanted.

Note: While you are using cl_ironsight_test_wpn_offset 1, if you change to another weapon to edit it and use the ironsight, it probably look weird since you are using the same values of the previous weapon. Setting cl_ironsight_test_wpn_offset to 0 will make the rest of ironsights work properly.

List of console commands about ironsights

  • cl_ironsight_test_wpn_offset = "0"- Enable weapon ironsight edit mode
  • cl_ironsight_test_wpn_offset_x = "0"
  • cl_ironsight_test_wpn_offset_y = "0"
  • cl_ironsight_test_wpn_offset_z = "0"
  • cl_ironsight_test_wpn_ori_offset_x = "0"
  • cl_ironsight_test_wpn_ori_offset_y = "0"
  • cl_ironsight_test_wpn_ori_offset_z = "0"
  • ironsight_toggle - Toggles ironsight mode for the current weapon