再次研究攻击主动性,蜜狐请进

我发现TALON的自杀炸弹球会主动滚到敌人那里自杀,能不能仿照这个使近战的单位主动上前攻击?

原地时的默认动作有个 巡逻。
自动加速的单位可以那样。

:6_275:巡逻的话单位会到处跑的

还有好几种 默认状态
记得有一个是主动攻击

我试了好多个,没一个行:6_305:

也许在 脚本里有特殊处理

这个单位有研究价值。

脚本发来,我来看看。。。另外这个炸弹球一共有几个武器?也一并发上来吧。。。

看过脚本,没看出有什么相关的,猫版原子版的是不是也会这样?

如果你确认脚本里没有,那就把单位的属性代码和它用到的武器代码发上来。

脚本
piece base, sphere;

#include “exptype.h”

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;
}
}

Create()
{
start-script SmokeUnit();
}

StartMoving()
{
spin sphere around x-axis speed <250> accelerate <10>;
}

StopMoving()
{
spin sphere around x-axis speed <0> accelerate <10>;
}

SweetSpot (piecenum)
{
piecenum = base;
}

Killed(severity, corpsetype)
{
if (severity <= 25)
{
corpsetype = 1;
explode sphere type SHATTER | BITMAP4;
return(0);
}
if (severity <= 50)
{
corpsetype = 2;
explode sphere type SHATTER | BITMAP4;
return(0);
}
if (severity <= 99)
{
corpsetype = 3;
explode sphere type SHATTER | EXPLODE_ON_HIT | BITMAP4;
return(0);
}
corpsetype = 3;
explode sphere type SHATTER | EXPLODE_ON_HIT | BITMAP4;
return(0);
}

:6_327:60秒悲剧
单位属性
[UNITINFO]
{
UnitName=TALSPHERE;
Version=1;
Side=TALON;
Objectname=TALSPHERE;
Designation=Nothing here;
Name=Martyr;
Description=Rolling Bomb;
FootprintX=1;
FootprintZ=1;
BuildCostEnergy=3500;
BuildCostMetal=20;
MaxDamage=300;
MaxWaterDepth=112;
MaxSlope=25;
EnergyUse=5;
BuildTime=2500;
WorkerTime=0;
BMcode=1;
Builder=0;
ThreeD=1;
ZBuffer=1;
NoAutoFire=0;
SightDistance=300;
RadarDistance=0;
SoundCategory=ROACH;
EnergyStorage=0;
MetalStorage=0;
ExplodeAs=BLASTSML;
SelfDestructAs=BLASTSML;
Category=CORE KBOT WEAPON LEVEL2 NOTAIR NOTSUB KAMIKAZE CTRL_L CTRL_W CTRL_M;
TEDClass=KBOT;
Copyright=Copyright 1997 Humongous Entertainment. All rights reserved.;
UnitNumber=9359;
Corpse=talsphere_dead;
firestandorders=1;
StandingFireOrder=0;
mobilestandorders=1;
StandingMoveOrder=1;
canmove=1;
canpatrol=1;
canstop=1;
canguard=1;
MaxVelocity=1.9;
BrakeRate=0.12;
Acceleration=0.1;
TurnRate=1370;
SteeringMode=1;
ShootMe=1;
EnergyMake=0.1;
DefaultMissionType=Standby;
maneuverleashlength=640;
MovementClass=INF1;
canattack=1;
wpri_badTargetCategory=VTOL;
BadTargetCategory=VTOL;
NoChaseCategory=VTOL;
kamikaze=1;
Ovradjust=1;
kamikazedistance=90;
upright=1;
}

无武器

怪事。。。和炸弹爬虫比较后发现只有视野距离300比较远(爬虫101),然后移动类别不同(INF1,爬虫的是TANKDS2),不过移动类别和自动攻击应该没啥关系才对吧。。。

视距是我调整的,原来也只有100
移动类型应该没啥关系,还有一些机枪兵也是用这个移动类型

会不会是TRO修改了主程序令自杀的单位会主动扑上去?

。。。这几乎不可能。。。

我还是比较怀疑。。。TALON里那个炸弹球真的会自己去攻击视距内射程外的敌人吗?你没有给它布置过诸如Guard、Patrol之类的指令?

刚刚输入+showranges
发现只要一进入视野范围,按住shift,就可以看到敌人身上有攻击标志,自杀球就撞过去,距离是视野的300,而不是自杀距离90

另外测试表明跟移动类型应该无关,高级自杀球的移动类型是TANKSH2,视野300,自杀距离90,一样进入视野就冲。

我用花猫版里的自杀爬虫试试去。。。