Creating Custom Ammos

From Obsidian Conflict Wiki
Revision as of 11:51, 1 March 2013 by Maestro Fenix (talk | contribs) (Scripted Weapons using Custom Ammo)
Jump to: navigation, search
Language: [[::Creating Custom Ammos|English]]
WIP.png This page is still a Work In Progress

Overview

In Obsidian Conflict, you can define your own custom ammo for your custom weapons. Used with the item_custom entity, it will allow you even create your own types of ammo, with their own model and amount of ammo.


Setting up your map with Custom Ammo

For use a custom ammo of a custom weapon in your map, you must put the following code in your map modify script (mapname_modify). This is an example:

map
{
	CustomAmmo
	{
		"ak47" //Name of your ammo
		{
			"dmgtype"		"1"
			"tracer"		"4"
			"plrdmg"		"10"	//Damage done by players using this ammo.
			"npcdmg"		"10"	//Damage done by NPCs using this ammo.
			"maxcarry"		"10"
			"grains"		"200"	// 1 grain = 64.79891 milligrams
			"ftpersec"		"1225"
		}
	}
}

dmgtype Type of damage done. CRUSH = 0, BULLET = 1, SLASH = 2, BURN = 3, VEHICLE = 4, FALL = 5, BLAST = 6, CLUB = 7, SHOCK = 8, SONIC = 9, ENERGYBEAM = 10

tracer Type of tracer done for the ammo when fired. NONE = 0, LINE = 1, RAIL = 2, BEAM = 3, LINE AND WHIZ = 4 Note: The Rail and Beam tracers aren´t setup correctly in code and as such tend to fail.

plrdmg Damage done by players when using this ammo.

npcdmg Damage done by NPCs when using this ammo.

maxcarry The maximum amount of this ammo that you can carry.

grains Weight of the ammo. ToDo: This has any effect?

ftpersec ToDo: Speed of the ammo when fired?


Setting up a custom ammo item in Hammer

Use the item_custom entity for place inside your map the ammo. You can set the model and the amount of ammo that it will contain.

Scripted Weapons using Custom Ammo

Take a look on the page of how to make Scripted Weapons.