Skip to content
Permalink
Browse files

added xrocketturret

  • Loading branch information
Damgam committed Nov 18, 2019
1 parent 26b33c3 commit 78e69564015ae51f55b6c6463d6063113f477722
@@ -87,6 +87,7 @@ Shared.buildListXCommander = {
[[xsolar]],
[[xstorage]],
[[xllt]],
[[xrocketturret]],
}

Shared.buildListXKLab = {
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File renamed without changes.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
@@ -0,0 +1,112 @@
#define TA // This is a TA script

#include "sfxtype.h"
#include "exptype.h"

piece base, firepoint, turret, barrel, launcher, sleeve;

static-var gun_1;

// Signal definitions
#define SIG_AIM 2


SmokeUnit(healthpercent, sleeptime, smoketype)
{
while( get BUILD_PERCENT_LEFT )
{
sleep 400;
}
while( TRUE )
{
healthpercent = get HEALTH;
if( healthpercent < 66 )
{
smoketype = 256 | 2;
if( Rand( 1, 66 ) < healthpercent )
{
smoketype = 256 | 1;
}
emit-sfx smoketype from base;
}
sleeptime = healthpercent * 50;
if( sleeptime < 200 )
{
sleeptime = 200;
}
sleep sleeptime;
}
return (0);
// Build by COBBLER Ver4.0 Copyright @1998 DIGITAL CONCEPT SOFTWARE (MANU@inext.fr) / http://www.annihilationcenter.com/DCS/
}

Create()
{

gun_1 = firepoint;
start-script SmokeUnit();
return (0);
}

AimPrimary(heading, pitch)
{
signal SIG_AIM;
set-signal-mask SIG_AIM;
if( gun_1 == 1 )
{
turn sleeve to z-axis <0.000000> speed <400.000000>;
}
if( gun_1 == 2 )
{
turn sleeve to z-axis <120.027473> speed <400.000000>;
}
if( gun_1 == 3 )
{
turn sleeve to z-axis <-120.027473> speed <400.000000>;
}
turn turret to y-axis heading speed <5000.000000>;
turn launcher to x-axis <0.000000> - pitch speed <5000.000000>;
wait-for-turn sleeve around z-axis;
wait-for-turn turret around y-axis;
wait-for-turn launcher around x-axis;
return (1);
}

FirePrimary()
{
emit-sfx 1024 from firepoint;
++gun_1;
if( gun_1 == 4 )
{
gun_1 = firepoint;
}
return (0);
}

AimFromPrimary(piecenum)
{
piecenum = turret;
return (0);
}

QueryPrimary(piecenum)
{
piecenum = firepoint;
return (0);
}

SweetSpot(piecenum)
{
piecenum = base;
return (0);
}

Killed(severity, corpsetype)
{
corpsetype = 1;
explode base type EXPLODE_ON_HIT;
explode turret type EXPLODE_ON_HIT;
explode launcher type EXPLODE_ON_HIT;
explode sleeve type EXPLODE_ON_HIT;
explode barrel type EXPLODE_ON_HIT;
}
Binary file not shown.
@@ -0,0 +1,131 @@
unitDef = {
buildAngle = 2048,
buildCostEnergy = 0,
buildCostMetal = 27,
builder = false,
buildTime = 5,
buildpic = [[pattern/xrocketturret.png]],
canAttack = true,
canstop = "1",
category = "BUILDING NOTAIR",
collisionVolumeTest = "1",
description = [[Anti-Raid Defense Platform (Anti-Light)]],
energyStorage = 0,
energyUse = 0,
explodeAs = "mediumBuildingExplosionGeneric",
footprintX = 4,
footprintZ = 4,
floater = true,
idleAutoHeal = .5,
idleTime = 2200,
iconType = "turret_lit",
maxDamage = 625,
maxSlope = 60,
maxWaterDepth = 999999,
metalStorage = 0,
name = humanName,
objectName = objectName,
script = script,
onlytargetcategory2 = "NOTAIR",
onlytargetcategory3 = "NOTAIR",
onlytargetcategory4 = "NOTAIR",
onlytargetcategory5 = "NOTAIR",
onlytargetcategory6 = "NOTAIR",
radarDistance = 0,
repairable = false,
selfDestructAs = "mediumBuildingExplosionGeneric",
side = "CORE",
sightDistance = 650,
smoothAnim = true,
unitname = unitName,
workerTime = 0,
yardMap = "oooo oooo oooo oooo",

sfxtypes = {
pieceExplosionGenerators = {
"deathceg3",
"deathceg4",
},

explosiongenerators = {
"custom:gdhcannon",
"custom:needspower",
"custom:blacksmoke",
},
},
sounds = {
underattack = "other/unitsunderattack1",
select = {
"other/turretselect",
},
},
weapons = {
[1] = {
def = "lighteweapon",
badTargetCategory = "VTOL ARMORED",
onlyTargetCategory = "BIO LIGHT VTOL ARMORED",
},
},
customParams = {
isupgraded = isUpgraded,
unittype = "turret",
RequireTech = tech,
needed_cover = 2,
--supply_cost = supply,
death_sounds = "generic",
armortype = armortype,
normaltex = "unittextures/afaction_normals.dds",
factionname = "pattern",
corpse = "energycore",
},
useGroundDecal = true,
BuildingGroundDecalType = "factorygroundplate.dds",
BuildingGroundDecalSizeX = 6,
BuildingGroundDecalSizeY = 6,
BuildingGroundDecalDecaySpeed = 0.9,
}

weaponDefs = {
lighteweapon = {
AreaOfEffect = 25,
avoidFeature = false,
avoidFriendly = false,
collideFeature = false,
collideFriendly = false,
cegTag = "railgun",
coreThickness = 0.5,
duration = 0.1,
energypershot = 0,
explosionGenerator = "custom:genericshellexplosion-small-blue",
fallOffRate = 0,
fireStarter = 50,
impulseFactor = 0,
interceptedByShieldType = 4,

minintensity = "1",
name = "Laser",
range = 650,
reloadtime = 0.5,
WeaponType = "LaserCannon",
rgbColor = "0 0 1",
rgbColor2 = "1 1 1",
soundTrigger = true,
soundstart = "weapons/lightturret.wav",
texture1 = "shot",
texture2 = "empty",
thickness = 12,
tolerance = 1000,
turret = true,
weaponVelocity = 2000,
waterweapon = true,
customparams = {
isupgraded = isUpgraded,
damagetype = "elightturret2",
unittype = "turret",
effectedByunitHealthModifier = true,
},
damage = {
default = 100,
},
},
}
@@ -0,0 +1,26 @@
-- UNITDEF -- xrocketturret --
--------------------------------------------------------------------------------

unitName = [[xrocketturret]]

--------------------------------------------------------------------------------

isUpgraded = [[0]]

humanName = [[Rocket Turret]]

objectName = [[faction/xrocketturret.s3o]]
script = [[faction/xrocketturret.cob]]

tech = [[tech0]]
armortype = [[building]]
--supply = [[3]]

VFS.Include("units-configs-basedefs/basedefs/faction/xrocketturret_basedef.lua")

unitDef.weaponDefs = weaponDefs
--------------------------------------------------------------------------------

return lowerkeys({ [unitName] = unitDef })

--------------------------------------------------------------------------------

0 comments on commit 78e6956

Please sign in to comment.
You can’t perform that action at this time.