unnem
  • unnem
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago
I have very weird problem.
I created unit with suicide weapon and command button that detonates it.
but when im trying to use it theres an error. game crash etc.
here is weapon code:

Weapon CampaignBombpackWeapon
  PrimaryDamage = 6000.0            
  PrimaryDamageRadius = 220.0      
  ScatterRadiusVsInfantry = 0.0
  AttackRange = 30.0
  DamageType = EXPLOSION
  DeathType = EXPLODED
  WeaponSpeed = 999999               ; ignored for projectile weapons
  RadiusDamageAffects = ALLIES ENEMIES NEUTRALS SELF SUICIDE
  DelayBetweenShots = 1  ; time between shots, msec
  ClipSize = 1  
  ClipReloadTime = 1000
  AutoReloadsClip = No
  FireFX = Effect
  DamageDealtAtSelfPosition = Yes
End
unit code:

[...]

  WeaponSet
    Conditions = None 
    Weapon = TERTIARY CampaignBombpackWeapon
    AutoChooseSources = TERTIARY NONE
  End
[...]
  CommandSet  = CampaignBombpackHolderCS
[...]
(only important things)
and command button code:

CommandButton Command_BombPackDetonateNow
  Command           = FIRE_WEAPON
  WeaponSlot        = TERTIARY
  Options           = OK_FOR_MULTI_SELECT
  ButtonImage       = SSTerroristCarBomb
  ButtonBorderType  = ACTION
End

anyone have idea what could be wrong?
[unit using this ability in mission automaticly - IF: unit "unit" enter area "area" THEN: use command button ability Command_BombPackDetonateNow]
==========================================
I just tried to detonate it using button and it works. Theres something wrong with map but i have no idea what... Script is:

*** IF ***
     Unit 'officer' enters  area 'reportin'
*** THEN ***
  Show military briefing String: 'SCRIPT:3' for  7500  milliseconds.
   Boundary Green becomes the active border.
  Move camera to Waypoint 'northcam' in 2.00 seconds, camera shutter 0.00 seconds, ease-in 0.00 seconds, ease-out 0.00 seconds.
  Enable Script 'Lose'.
   Unit 'officer' use Ability 'Command_BombPackDetonateNow'.
I tried to do it with disabled "win" or "lose" scripts because i thought game can't destroy unit that is needed or something 😛 but game still crashing.
Also exactly same thing with bomb truck. So isn't about unit... Any ideas? :/
Sponsor
CommieDog
12 years ago
From what I remember of the Generals INI code, the Bomb Truck has a module that allows the AI to use its abilities. Maybe that has something to do with it.
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you
unnem
  • unnem
  • 50.25% (Neutral)
  • Private Topic Starter
12 years ago
but which one?
i can see only SpecialAbility [disguise], StealthUpdate, CreateCrateDie, FXListDie, TransitionDamageFX, FlammableUpdate, SubObjectsUpgrade [show part of model], FireWeaponWhenDeadBehavior, ProductionUpdate, SlowDeathBehavior, and other basic like ActiveBody etc. Also when i tried to use bombtruck in editor game crashed.