Permalink
Browse files

Add laserbattery

Configure clusterbomber
Allow aircraft to land
  • Loading branch information...
ForbodingAngel committed Sep 11, 2018
1 parent b0dfc0e commit 38eb36d0a4f1eead9128006a2a48a6ec9e1d9017
@@ -78,7 +78,9 @@ function UnitDef_Post(name, uDef)
-- This ties in with the global Cylinder Targetting
-- Default airsightdistance is sightdistance * 1.5
--uDef.airsightdistance = uDef.sightdistance * 2 --No longer needed
uDef.airsightdistance = uDef.sightdistance
if uDef.airsightdistance == uDef.sightdistance * 1.5 then
uDef.airsightdistance = uDef.sightdistance
end
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
@@ -173,8 +175,9 @@ end
-- process weapondef
function WeaponDef_Post(name, wDef)
-- Cylinder Targeting for everything
-- Cylinder Targeting and infinite vertical range for everything
wDef.cylindertargeting = 128
--wDef.heightmod = 1
--Use targetborderoverride in weapondef customparams to override this global setting
--Controls whether the weapon aims for the center or the edge of its target's collision volume. Clamped between -1.0 - target the far border, and 1.0 - target the near border.
@@ -287,10 +287,10 @@ local damageClasses = {
LIGHT = 1,
BUILDING = 0.1,
},
eaaturret = {
elaserbattery = {
ARMORED = 1,
LIGHT = 0.66,
BUILDING = 0.66,
LIGHT = 1,
BUILDING = 1,
},
elrpc = {
ARMORED = 0.25,
@@ -16,6 +16,7 @@ Shared.buildList = {
[[emine]],
[[elightturret2]],
[[eheavyturret2]],
[[elaserbattery]],
[[eartyturret]],
-- [[euwturret]],
[[eshieldgen]],
@@ -52,41 +52,41 @@ end
function switchAirpadToFlyMode(unitID, unitDefID)
if (unitDefID == UnitDefNames["eairengineer"].id or
unitDefID == UnitDefNames["ebomber"].id or
unitDefID == UnitDefNames["edrone"].id or
unitDefID == UnitDefNames["edrone_up1"].id or
unitDefID == UnitDefNames["edrone_up2"].id or
unitDefID == UnitDefNames["edrone_up3"].id or
unitDefID == UnitDefNames["efighter"].id or
unitDefID == UnitDefNames["egunship2"].id or
unitDefID == UnitDefNames["escout"].id or
unitDefID == UnitDefNames["eraider"].id or
unitDefID == UnitDefNames["eraider_up1"].id or
unitDefID == UnitDefNames["eraider_up2"].id or
unitDefID == UnitDefNames["eraider_up3"].id or
unitDefID == UnitDefNames["etransport"].id or
unitDefID == UnitDefNames["ebomber_up1"].id or
unitDefID == UnitDefNames["efighter_up1"].id or
unitDefID == UnitDefNames["egunship2_up1"].id or
unitDefID == UnitDefNames["escout_up1"].id or
unitDefID == UnitDefNames["etransport_up1"].id or
unitDefID == UnitDefNames["ebomber_up2"].id or
unitDefID == UnitDefNames["efighter_up2"].id or
unitDefID == UnitDefNames["egunship2_up2"].id or
unitDefID == UnitDefNames["escout_up2"].id or
unitDefID == UnitDefNames["etransport_up2"].id or
unitDefID == UnitDefNames["ebomber_up3"].id or
unitDefID == UnitDefNames["efighter_up3"].id or
unitDefID == UnitDefNames["egunship2_up3"].id or
unitDefID == UnitDefNames["escout_up3"].id or
unitDefID == UnitDefNames["etransport_up3"].id or
unitDefID == UnitDefNames["ekrow"].id or
unitDefID == UnitDefNames["ekrow_up1"].id or
unitDefID == UnitDefNames["ekrow_up2"].id or
unitDefID == UnitDefNames["ekrow_up3"].id) then
spGiveOrderToUnit(unitID, CMD.IDLEMODE, { 0 }, {})
end
-- if (unitDefID == UnitDefNames["eairengineer"].id or
-- unitDefID == UnitDefNames["ebomber"].id or
-- unitDefID == UnitDefNames["edrone"].id or
-- unitDefID == UnitDefNames["edrone_up1"].id or
-- unitDefID == UnitDefNames["edrone_up2"].id or
-- unitDefID == UnitDefNames["edrone_up3"].id or
-- unitDefID == UnitDefNames["efighter"].id or
-- unitDefID == UnitDefNames["egunship2"].id or
-- unitDefID == UnitDefNames["escout"].id or
-- unitDefID == UnitDefNames["eraider"].id or
-- unitDefID == UnitDefNames["eraider_up1"].id or
-- unitDefID == UnitDefNames["eraider_up2"].id or
-- unitDefID == UnitDefNames["eraider_up3"].id or
-- unitDefID == UnitDefNames["etransport"].id or
-- unitDefID == UnitDefNames["ebomber_up1"].id or
-- unitDefID == UnitDefNames["efighter_up1"].id or
-- unitDefID == UnitDefNames["egunship2_up1"].id or
-- unitDefID == UnitDefNames["escout_up1"].id or
-- unitDefID == UnitDefNames["etransport_up1"].id or
-- unitDefID == UnitDefNames["ebomber_up2"].id or
-- unitDefID == UnitDefNames["efighter_up2"].id or
-- unitDefID == UnitDefNames["egunship2_up2"].id or
-- unitDefID == UnitDefNames["escout_up2"].id or
-- unitDefID == UnitDefNames["etransport_up2"].id or
-- unitDefID == UnitDefNames["ebomber_up3"].id or
-- unitDefID == UnitDefNames["efighter_up3"].id or
-- unitDefID == UnitDefNames["egunship2_up3"].id or
-- unitDefID == UnitDefNames["escout_up3"].id or
-- unitDefID == UnitDefNames["etransport_up3"].id or
-- unitDefID == UnitDefNames["ekrow"].id or
-- unitDefID == UnitDefNames["ekrow_up1"].id or
-- unitDefID == UnitDefNames["ekrow_up2"].id or
-- unitDefID == UnitDefNames["ekrow_up3"].id) then
-- spGiveOrderToUnit(unitID, CMD.IDLEMODE, { 0 }, {})
-- end
end
function widget:PlayerChanged(playerID)
View
Binary file not shown.
View
@@ -0,0 +1,135 @@
#define TA // This is a TA script
#include "sfxtype.h"
#include "exptype.h"
piece base, beams, firepoint1, lilypad; // these are the pieces of the model
static-var CanFire, shooting_num, terraintype;
// Signal definitions
#define SIG_AIM 2 // this is a aim define <- o_O This is a kill flag
// Custom SFX
#define GDMARTY 1024+0
SmokeUnit()// this is a standard smoke point define
{
var healthpercent, sleeptime, smoketype;
while( TRUE )
{
healthpercent = get HEALTH;
if( healthpercent < 66 )
{
smoketype = SFXTYPE_BLACKSMOKE;
if( Rand( 1, 66 ) < healthpercent )
smoketype = SFXTYPE_WHITESMOKE;
emit-sfx 1026 from base;
}
sleeptime = healthpercent * 50;
if( sleeptime < 200 )
sleeptime = 200;
sleep sleeptime;
}
}
setSFXoccupy(setSFXoccupy_argument)
{
terraintype = setSFXoccupy_argument;
if(terraintype == 2)
{
move base to y-axis [-0.5] speed [50];
show lilypad;
}
else
{
move base to y-axis [0] speed [50];
hide lilypad;
}
if(terraintype == 4)
{
move base to y-axis [0] speed [50];
hide lilypad;
}
else
{
move base to y-axis [-0.85] speed [50];
show lilypad;
}
}
cannotfire()
{
while( TRUE )
{
if (!CanFire)
{
emit-sfx 1025 from firepoint1;
}
sleep 1500;
}
}
Create() // tells it what to do on creation
{
CanFire=TRUE;
shooting_num=1;
while( get BUILD_PERCENT_LEFT )
sleep 400;
start-script SmokeUnit();
start-script cannotfire();
}
RestoreAfterDelay() // restore function to turn the turret and so forth back to start
{
}
AimWeapon1(heading, pitch) // aiming animation and firing authorization
{
signal SIG_AIM;
set-signal-mask SIG_AIM;
while(!CanFire)
sleep 200;
start-script RestoreAfterDelay();
return (1);
}
FireWeapon1() // what do while firing, fires 1 barrel then the next , and resets
{
emit-sfx GDMARTY from firepoint1;
}
AimFromWeapon1(piecenum) // where it aims the weapon from
{
piecenum = firepoint1;
}
QueryWeapon1(piecenum) // where the shot is created at
{
piecenum=firepoint1;
}
/*
TechLost()
{
CanFire=FALSE;
signal SIG_AIM;
stop-spin turret around y-axis decelerate <10>;
stop-spin barrel1 around x-axis decelerate <10>;
}
TechGranted()
{
CanFire=TRUE;
}
*/
Killed(severity, corpsetype) // how it explodes
{
corpsetype = 1;
explode base type EXPLODE_ON_HIT;
explode beams type EXPLODE_ON_HIT;
explode lilypad type EXPLODE_ON_HIT;
}
View
Binary file not shown.
@@ -1,7 +1,7 @@
unitDef = {
acceleration = 0.5,
--acceleration = 0.5,
airStrafe = false,
airHoverFactor = 0,
--airHoverFactor = 0,
BadTargetCategory = "VTOL",
brakeRate = 1,
buildCostEnergy = 0,
@@ -17,7 +17,7 @@ unitDef = {
canstop = true,
category = "ARMORED VTOL",
collide = true,
cruiseAlt = 140,
cruiseAlt = 1000,
description = [[Unit Type: Bomber • Uses +]] .. supply .. [[ Supply]],
energyMake = 0,
energyStorage = 0,
@@ -26,14 +26,15 @@ unitDef = {
footprintX = 7,
footprintZ = 7,
floater = true,
hoverAttack = true,
hoverAttack = false,
iconType = "air_bomb",
idleAutoHeal = .5,
idleTime = 2200,
loopbackattack = false,
maxacc = 1,
maxDamage = 337,
maxSlope = 90,
maxVelocity = 4.5,
maxVelocity = 10,
verticalSpeed = 15,
maxWaterDepth = 0,
metalStorage = 0,
@@ -45,11 +46,12 @@ unitDef = {
repairable = false,
selfDestructAs = "largeExplosionGeneric",
side = "CORE",
sightDistance = 650,
sightDistance = 1500,
smoothAnim = true,
stealth = false,
transportbyenemy = false;
turnRate = 5000,
turnradius = 250,
unitname = unitName,
upright = true,
workerTime = 0,
@@ -75,7 +77,8 @@ unitDef = {
},
weapons = {
[1] = {
def = "missile",
def = "clusterbombs",
onlytargetcategory = "BUILDING",
noChaseCategory = "VTOL LIGHT ARMORED",
},
},
@@ -97,6 +100,40 @@ unitDef = {
}
weaponDefs = {
clusterbombs = {
AreaOfEffect = 150,
avoidFriendly = false,
avoidFeature = false,
collideFriendly = false,
collideFeature = false,
burst = 20,
burstrate = 0.1,
--cegTag = "antiassualtshot2",
explosionGenerator = "custom:genericshellexplosion-medium",
energypershot = 0,
impulseFactor = 0,
interceptedByShieldType = 4,
name = unitName .. "Weapon",
range = 800,
reloadtime = 10,
size = 2,
weaponType = "Cannon",
soundHit = "explosions/bombhit.wav",
soundStart = "weapons/18393_inferno_reject.wav",
sprayangle = 10000,
tolerance = 2000,
turret = false,
weaponVelocity = 200,
customparams = {
isupgraded = isUpgraded,
damagetype = "ebomber",
},
damage = {
default = 25,
},
},
missile = {
AreaOfEffect = 1,
avoidFriendly = false,
Oops, something went wrong.

0 comments on commit 38eb36d

Please sign in to comment.