Difference between revisions of "Creating Custom Ammos"
m |
(→Setting up your map with Custom Ammo) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{Languages}} | ||
+ | {{wip}} | ||
__TOC__ | __TOC__ | ||
− | |||
− | == Setting up your | + | ==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: | |
<pre> | <pre> | ||
− | + | map | |
{ | { | ||
− | |||
− | |||
− | |||
− | |||
CustomAmmo | CustomAmmo | ||
{ | { | ||
− | "ak47" | + | "ak47" //Name of your ammo |
{ | { | ||
"dmgtype" "1" | "dmgtype" "1" | ||
"tracer" "4" | "tracer" "4" | ||
− | "plrdmg" "10" //Damage done by players using this | + | "plrdmg" "10" //Damage done by players using this ammo. |
− | "npcdmg" "10" //Damage done by NPCs using this | + | "npcdmg" "10" //Damage done by NPCs using this ammo. |
"maxcarry" "10" | "maxcarry" "10" | ||
"grains" "200" // 1 grain = 64.79891 milligrams | "grains" "200" // 1 grain = 64.79891 milligrams | ||
Line 29: | Line 31: | ||
</pre> | </pre> | ||
− | + | '''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 | 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 | NONE = 0, LINE = 1, RAIL = 2, BEAM = 3, LINE AND WHIZ = 4 | ||
− | Note: The Rail and Beam tracers | + | |
+ | '''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 == | == Setting up a custom ammo item in Hammer == | ||
− | + | Use the [http://wiki.obsidianconflict.net/?title=Item_custom 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 == | == Scripted Weapons using Custom Ammo == | ||
− | + | Take a look on the page of how to make [http://wiki.obsidianconflict.net/?title=Scripted_Weapons Scripted Weapons]. | |
[[Category:MapTuts]] | [[Category:MapTuts]] |
Latest revision as of 11:53, 1 March 2013
Language: | [[::Creating Custom Ammos|English]] |
---|
Contents
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.