add bomb arrow

issue1247
Maikel de Vries 2015-01-04 09:18:40 +01:00
parent 8e54a567c4
commit 32754c8a4e
13 changed files with 59 additions and 0 deletions

View File

@ -0,0 +1,16 @@
[DefCore]
id=BombArrow
Version=6,0
Category=C4D_Object
Width=4
Height=15
Offset=-2,-7
Vertices=3
VertexY=-6,6,0
VertexFriction=120,120,120
Value=35
Mass=12
Components=Wood=3;Metal=1;Firestone=2;
Picture=12,0,64,64
Rotate=1
Float=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -0,0 +1,39 @@
/*
Bomb Arrow
Same as an arrow but explodes on impact. Overloads from the arrow script
and implements additional features.
@author Maikel
*/
#include Arrow
// Callback from the hitcheck effect: explode on impact with target.
public func HitObject(object obj)
{
// First let the normal arrow hit take place, then explode for additonal damage.
_inherited(obj, ...);
// Explosion strength a little random with only a small radius.
return Explode(12 + Random(3));
}
// Callback on hit: explode on impact with landscape.
public func Hit()
{
// Only explode on impact with the landscape if the object was in flight.
// Explosion strength a little random with only a small radius.
if (GetEffect("InFlight", this))
return Explode(12 + Random(3));
return;
}
// Determines the arrow strength: only 40% that of the normal arrow.
public func ArrowStrength() { return 4; }
/*-- Properties --*/
local Name = "$Name$";
local Description = "$Description$";
local Collectible = 1;

View File

@ -0,0 +1,2 @@
Name=Feuerpfeile
Description=Explosive Munition f<>r den Bogen.

View File

@ -0,0 +1,2 @@
Name=Fire Arrows
Description=Explosive ammunition for the bow.