Railgun Speargun hybrid?

User avatar
S_hift
Posts: 1963
Joined: Fri Dec 23, 2011 1:42 pm

Railgun Speargun hybrid?

Post by S_hift »

so heres the code for the speargun from reality bites. Potentially you could turn the Railgun into the Speargun.

Code: Select all

ItemData GasserAmmo
{
	description = "Spears";
	className = "Ammo";
	shapeFile = "mortarammo";
	heading = "xAmmunition";
	shadowDetailMask = 4;
	price = 1;
};


ItemImageData GasserImage
{
	shapeFile = "grenadeL";
	mountPoint = 0;

	weaponType = 0; // Single Shot
	projectileType = GasserGrenade;
	ammoType = GasserAmmo;
	accuFire = True;
	reloadTime = 0.25;
	fireTime = 1.25;
	
	lightType = 3; // Weapon Fire
	lightRadius = 5;
	lightTime = 2;
	lightColor = { 0, 0, 1 };

	sfxFire = debrisMediumExplosion;
	sfxActivate = SoundPickUpWeapon;
	sfxReload = SoundMortarReload;
};

ItemData Gasser
{
	description = "Speargun";
	className = "PriWeapon";
	shapeFile = "grenadeL";
	hudIcon = "plasma";
	heading = "bPrimary Weapons";
	shadowDetailMask = 4;
	imageType = GasserImage;
	price = 250;
	showWeaponBar = true;
};

function Gasser::onUse(%player,%item)
{
	%clientId = Player::getClient(%player);
		Weapon::onUse(%player,%item);
		bottomprint(Player::getClient(%player), "<jc><f2>\nSpeargun - fires Slow, but lethal spears. <f1> Identical in fire speed to the classic disc launcher.\n", 5);
}


ItemImageData GasserScopeImage
{
	shapeFile  = "discammo";
	mountPoint = 0;
	mountRotation = { 1.5, 0, 0 };
	weaponType = 0; // Single Shot
	mountOffset = { -0.0, 0.0, -0.1 };

	ammoType = GasserAmmo;
	reloadTime = 0.1;
	fireTime = 0.1;

	projectileType = DEBullet;
	accuFire = false;

	sfxFire = turretexplosion;
	sfxActivate = SoundPickUpWeapon;
};

ItemData GasserScope
{
	heading = "cSecondary Weapons";
	description = "GasserScope";
	className = "Weapon";
	shapeFile  = "force";
	hudIcon = "blaster";
	shadowDetailMask = 4;
	imageType = GasserScopeImage;
	price = 50;
	showWeaponBar = true;
};

ItemImageData GasserClipImage
{
	shapeFile  = "grenadel";
	mountPoint = 0;
	mountRotation = {3.1, 0, 0 };
	weaponType = 0; // Single Shot
	mountOffset = { -0.0, -0.0, 0.0 };

	ammoType = EagleAmmo;
	reloadTime = 0.1;
	fireTime = 0.1;

	projectileType = DEBullet;
	accuFire = false;

	sfxFire = turretexplosion;
	sfxActivate = SoundPickUpWeapon;
};

ItemData GasserClip
{
	heading = "cSecondary Weapons";
	description = "GasserClip";
	className = "Weapon";
	shapeFile  = "grenadel";
	hudIcon = "blaster";
	shadowDetailMask = 4;
	imageType = GasserClipImage;
	price = 50;
	showWeaponBar = true;
};

function Gasser::onMount(%player,%item)
{
	Player::MountItem(%player,GasserScope,7);
	Player::MountItem(%player,GasserClip,6);
}
function Gasser::onUnMount(%player,%item)
{
	Player::UnMountItem(%player,7);
	Player::UnMountItem(%player,6);
}

SeekingMissileData TossedSpear
{
	bulletShapeName = "tracer.dts";
	explosionTag = SpearExp;
	collisionRadius = 0.0;
	mass = 2.0;
	damageClass = 0;
	damageValue = 2;
	damageType = $BulletDmgType36;
	explosionRadius = 0.5;
	kickBackStrength = 1.0;
	muzzleVelocity = 40.0;
	totalTime = 20.0;
	liveTime = 21.0;
	lightRange = 5.0;
	lightColor = { 1.0, 0.7, 0.5 };
	inheritedVelocityScale = 0.5;
	seekingTurningRadius = 55.0;
	nonSeekingTurningRadius = 50.0;
	proximityDist = 1.5;
	lightRange = 5.0;
	lightColor = { 0.4, 0.4, 1.0 };
	trailType = 2;
	trailString = "plasmatrail.dts";
	smokeDist = 2.5;
	inheritedVelocityScale = 0.5;
	soundId = SoundJetHeavy;
};

function TossedSpear::onAdd(%this)
{
    %this.isAlive = true;
    schedule("trackTossed(" @ %this @ ");", 0.1);
}

function TossedSpear::onremove(%this)
{
    %this.isAlive = false;
}

function trackTossed(%this)
{
    if(%this.isAlive == true)
    {
       if($spearPos[%this] == gamebase::getposition(%this))
       {
        %this.isAlive = false;
                    if(!$someoneSpeared)
                    {

					%camera = newObject("Spear","StaticShape",StuckSpear,true);
					addToSet("MissionCleanup", %camera);
					%myrot = $spearRot[%this];
                    %mypos = $spearPos[%this];

					GameBase::setRotation(%camera, %myrot);
					GameBase::setPosition(%camera,%mypos);

     				schedule("GameBase::setposition(" @ %camera @ ",'0 0 -1000');", 360);
                    schedule("removeSpear(" @ %camera @ ");",300);
                    }
        return;
       }
       $spearPos[%this] = gamebase::getposition(%this);
       $spearRot[%this] = gamebase::getrotation(%this);
       schedule("trackTossed(" @ %this @ ");", 0.1);
    }
}

RocketData MiniSpearProj
{
   bulletShapeName = "tracer.dts";
   explosionTag    = SpearExp;

   collisionRadius = 0.0;
   mass            = 2.0;

   damageClass      = 0;       // 0 impact, 1, radius
   damageValue      = 0.5;
   damageType       = $BulletDmgType36;

	//type 35 = lance

   explosionRadius  = 2.1;
   kickBackStrength = 10.0;

   muzzleVelocity   = 65.0;
   terminalVelocity = 80.0;
   acceleration     = 5.0;

   totalTime        = 6.5;
   liveTime         = 8.0;

   lightRange       = 5.0;
   lightColor       = { 0.4, 0.4, 1.0 };

   inheritedVelocityScale = 0.5;

   // rocket specific
   trailType   = 2;                // smoke trail
   trailString = "breath.dts";
   smokeDist   = 0.5;

   soundId = SoundJetHeavy;
};

function removeSpear(%this)
{
 if(%this.isSpear == true)
     deleteObject(%this);
}
Image <--Click here to subscribe to S_hift's youtube
Click here for full access to all my tribes downloads
User avatar
S_hift
Posts: 1963
Joined: Fri Dec 23, 2011 1:42 pm

Re: Railgun Speargun hybrid?

Post by S_hift »

This weapon would basically staple people to the wall or ground after you kill them.

You can also quickly retrieve the bolt and place it back into your inventory.

I believe you could only reuse a bolt once. Not sure. You could also pick up enemy bolts and use their kills against them.
Image <--Click here to subscribe to S_hift's youtube
Click here for full access to all my tribes downloads
User avatar
DaJ4ck3L
Crow{OZ}
Posts: 3375
Joined: Thu Jul 22, 2010 11:51 pm
Contact:

Re: Railgun Speargun hybrid?

Post by DaJ4ck3L »

how did u get rb? thought mod was unreleased.
Image
User avatar
Fixious
Posts: 475
Joined: Sat Nov 09, 2013 12:42 am

Re: Railgun Speargun hybrid?

Post by Fixious »

Eh, idk. I usually use the rail gun from quite a distance, so retrieving the spears would be a hassle. I'd rather see the speargun itself brought into Anni, either as a necro weapon or possibly cham.
User avatar
S_hift
Posts: 1963
Joined: Fri Dec 23, 2011 1:42 pm

Re: Railgun Speargun hybrid?

Post by S_hift »

Fixious wrote:Eh, idk. I usually use the rail gun from quite a distance, so retrieving the spears would be a hassle. I'd rather see the speargun itself brought into Anni, either as a necro weapon or possibly cham.

no, thats gay. you don't really even play annihilation.


retrieving the spears is just the perks of winning a close quarters fight.
The real point is this script has the potential to add unique physics system to the weapons, like railgun.


@crow. I'm not going to lie to you. So lets keep it as that. Here is the speargun code, use it to make the railgun cooler maybe make a crossbow type weapon out of it for a sticks and stones arena mode.

sticks and stones arena mode
- crossbow takes out 3/4 damage of a player
- thumper (assuming mid airs would be possible)
Image <--Click here to subscribe to S_hift's youtube
Click here for full access to all my tribes downloads
User avatar
DaJ4ck3L
Crow{OZ}
Posts: 3375
Joined: Thu Jul 22, 2010 11:51 pm
Contact:

Re: Railgun Speargun hybrid?

Post by DaJ4ck3L »

ive midaired with the thumper before. pretty sure i added a code so that u can at some point.

and fix plays anni all the time. shift, stop being a douche to everyone.

also, yea i add spear gun to anni. it was already on my todo list. i also have a copy of rb.
Image
User avatar
S_hift
Posts: 1963
Joined: Fri Dec 23, 2011 1:42 pm

Re: Railgun Speargun hybrid?

Post by S_hift »

you going to nerf the max damage? Its an insta kill gun that leads like a disc launcher

and yeah i don't mean to be douchy but cham or necro with a spear gun? thats kinda retarded. this is something that belongs in arena or something to add rag doll physics to certain weapons.

this weapon alone holds the key scripting to weapon physics/tribes physics.
Image <--Click here to subscribe to S_hift's youtube
Click here for full access to all my tribes downloads
User avatar
DaJ4ck3L
Crow{OZ}
Posts: 3375
Joined: Thu Jul 22, 2010 11:51 pm
Contact:

Re: Railgun Speargun hybrid?

Post by DaJ4ck3L »

yes shift, im going to take into account balance for the mod. it prob wont be a one hit killer.
Image
User avatar
S_hift
Posts: 1963
Joined: Fri Dec 23, 2011 1:42 pm

Re: Railgun Speargun hybrid?

Post by S_hift »

but yeah this code can do so much in the right hands.

- make depoyable packs boostable items. Like a station could be thrown to a hard to reach place.
- maybe an ability to defuse tossed ammo and throw back at the person who threw it at you.
- defusing mines with the pfork?

you could make a gun that shoots and deploys a turret


maybe even add the effect to all of the guns for a rag doll effect for certain weapons

maybe i'll post the sword so you can make the knife for assassin.
Image <--Click here to subscribe to S_hift's youtube
Click here for full access to all my tribes downloads
User avatar
DaJ4ck3L
Crow{OZ}
Posts: 3375
Joined: Thu Jul 22, 2010 11:51 pm
Contact:

Re: Railgun Speargun hybrid?

Post by DaJ4ck3L »

might use some of them ideas.
Image
Post Reply