Here are the fbi/lua files of the two units (intruder=transporter, cube=unit to be transported)
fbi file of intruder:
Code: Select all
[UNITINFO] {
unitname=intruder;
name=Intruder;
description=Amphibious Heavy Assault Transport;
acceleration=0.33;
bmcode=1;
brakeRate=0.165;
buildAngle=16384;
buildCostEnergy=1;
buildCostMetal=1;
builder=0;
buildPic=INTRUDER.DDS;
buildTime=1;
canGuard=0;
canload=1;
canMove=1;
canPatrol=1;
canstop=1;
cantBeTransported=1;
category=ALL HOVER MOBILE WEAPON NOTSUB NOTSHIP NOTAIR;
corpse=INTRUDER_DEAD;
defaultmissiontype=Standby;
energyMake=2.6;
energyStorage=0;
energyUse=2.9;
explodeAs=BIG_UNITEX;
firestandorders=1;
footprintX=4;
footprintZ=4;
idleAutoHeal=5;
idleTime=1800;
leaveTracks=1;
maneuverleashlength=640;
mass=2e+08;
maxDamage=12500;
maxVelocity=1.892;
maxWaterDepth=255;
metalMake=0;
metalStorage=0;
mobilestandorders=1;
movementClass=TANK;
noAutoFire=0;
objectName=INTRUDER;
releaseHeld=1;
scale=0.5;
seismicSignature=0;
selfDestructAs=BIG_UNIT;
side=SIDENAME1;
sightDistance=292;
smoothAnim=1;
soundcategory=CORE_TANK;
standingfireorder=1;
standingmoveorder=1;
steeringmode=1;
TEDClass=TANK;
trackOffset=-14;
trackStrength=10;
trackStretch=1;
trackType=StdTank;
trackWidth=42;
transportCapacity=40;
transportSize=4;
turnRate=215.6;
unloadSpread=4;
workerTime=0;
[customParams]
{
canharvest=1;
}
}
Code: Select all
unitDef = {
unitname = [[cube]],
name = [[resourcecube]],
description = [[resourcecube]],
acceleration = 0,
brakeRate = 0,
buildCostEnergy = 1,
buildCostMetal = 1,
builder = false,
buildPic = [[bassaulttank.png]],
buildTime = 3,
canAttack = false,
canGuard = false,
canMove = true,
canPatrol = false,
canstop = [[1]],
category = [[LAND]],
defaultmissiontype = [[Standby]],
explodeAs = [[SMALL_UNITEX]],
footprintX = 2,
footprintZ = 2,
iconType = [[vehiclescout]],
idleAutoHeal = 5,
idleTime = 1800,
leaveTracks = true,
maneuverleashlength = [[640]],
mass = 15,
maxDamage = 800,
maxSlope = 18,
maxVelocity = 0,
maxWaterDepth = 22,
minCloakDistance = 75,
movementClass = [[TANK]],
moveState = 0,
noAutoFire = false,
noChaseCategory = [[TERRAFORM FIXEDWING SATELLITE SUB]],
objectName = [[cube.s3o]],
reclaimTime = 5,
reclaimable = 1,
seismicSignature = 4,
selfDestructAs = [[SMALL_UNITEX]],
side = [[SIDENAME1]],
sightDistance = 550,
smoothAnim = true,
steeringmode = [[1]],
TEDClass = [[Tank]],
trackOffset = -3,
trackStrength = 3,
trackStretch = 1,
trackType = [[StdTank]],
trackWidth = 25,
transportByEnemy = 1,
turninplace = 0,
turnInPlace = 0,
turnRate = 0,
workerTime = 0,
script = [[cube.lua]],
}
return lowerkeys({ cube = unitDef })
(In the first case (my cube) when I try to load the unit the cursor becomes a load-cursor but in the second case (enemy cube) when I move the mouse over the cube the cursor becomes an arrow (like when nothing is selected))
I thought when I want a unit to be transported by enemy I just have to add the "transportByEnemy = 1," tag
