Azerom
  • Azerom
  • 61.25% (Friendly)
  • Private Topic Starter
15 years ago
Hi CnC Labs,

I have been reading these forums for weeks now and not found the answers to what I am looking for. I so need some help as I am close to pulling my hair out.

I have been working on a infantry map for a friend and he has asked me to "beef up" the infantry units in game. Everytime I edit something and put it into my map.ini the game crashes when I load the map.

Here's a few of the things he has asked me to do:

1. Give Colonel Burton Black Lotuses ability to capture buildings; I have tried a few different things here but fail everytime. When I edit the unit itself I get the button but not the ability to use it. When I edit the object the game crashes.

2. Give Jarmin Kell Black Lotuses ability to capture Buildings. Same problem different guy.

3. Give rangers, China Infantry and GLA rebels the ability to place timed demo charges. Again when I edit the unit from the commandset.ini I get the picture but not the ability. However, when I edit it from the americainfantry.ini into the map.ini folder, the game crashes when i load the map.

4. give tank hunters, rocket soldiers and stinger soldiers the ability to capture buildings. again, the same problem over and over and over.

I have no problem getting the picture of the ability in but have no idea how to get the unit to be able to use the abilities they are given. I cannot edit the game files because he wants to be able to play this map online with friends but it seems i cannot do this with the map.ini file.

I have learned sooo much from reading these forums over the last few weeks, one being that I could use map.ini's in this. before I always tried to do everything via scripting in WB. But I am at a loss as what to do her. Please help CnC please help me.

Thank you humbly in advance,
Az

P.S here is one of the many scripts i have tried and ultimately failed at. this script also crashes the game when you load the map:


CommandSet AmericaInfantryRangerCommandSet
  1  = Command_AmericaRangerCaptureBuilding
  2  = Command_AmericaRangerSwitchToMachineGun
  4  = Command_AmericaRangerSwitchToFlagBangGrenades
  5  = Command_GLAInfantryRebelBoobyTrapAttack
  11 = Command_AttackMove
  13 = Command_Guard
  14 = Command_Stop
End
  ExperienceValue = 20 20 40 60    ;Experience point value at each level
  ExperienceRequired = 0 40 60 120  ;Experience points needed to gain each level
  IsTrainable = Yes             ;Can gain experience
  CrushableLevel      = 0  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet          = AmericaInfantryRangerCommandSet
  CommandSet          = GLAInfantryRebelCommandSet
End
Sponsor
Annihilationzh
15 years ago
That script would crash the game.

What exactly was your thought process when making it?

This makes no sense:
  ExperienceValue = 20 20 40 60    ;Experience point value at each level
  ExperienceRequired = 0 40 60 120  ;Experience points needed to gain each level
  IsTrainable = Yes             ;Can gain experience
  CrushableLevel      = 0  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet          = AmericaInfantryRangerCommandSet
  CommandSet          = GLAInfantryRebelCommandSet
End
This crashes the game. These are parameters for an Object, but you didn't open an Object.

  CommandSet          = AmericaInfantryRangerCommandSet
  CommandSet          = GLAInfantryRebelCommandSet
Why declare two command sets?
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
Azerom
  • Azerom
  • 61.25% (Friendly)
  • Private Topic Starter
15 years ago
I was hoping that by adding the second command set that would allow the ranger to usethe booby trap ability from the rebel. i scripted in wb to show the booby trap button on the ranger and to show the buy boobytrap button in the barracks. it will let me buy the booby trap in the barracks, and will then show on the ranger as paid. but wont let me use the skill.


**edit** unfortunately i have only been using map.ini files for 4 days now so i have no idea what i am doing with them. i can script real good in wb, just not so much with the ini due to not knowing what does what.
Annihilationzh
15 years ago
There is a lot more to the booby trap than just a button. There are actually three modules in the rebels code dedicated to it.

This should (note: I am an expert at stupid mistakes) make the ranger place booby traps after the upgrade is purchased.

CommandSet AmericaInfantryRangerCommandSet
  5  = Command_GLAInfantryRebelBoobyTrapAttack
End

Object AmericaInfantryRanger
 AddModule ModuleTag_Booby_Override 
  Behavior = SpecialAbility ModuleTag_Booby
    SpecialPowerTemplate = SpecialAbilityBoobyTrap
    UpdateModuleStartsAttack = Yes
    StartsPaused              = Yes
    InitiateSound = RebelVoiceBoobyTrapInstall
  End
 End
 AddModule ModuleTag_Trap_Override
  Behavior = SpecialAbilityUpdate ModuleTag_Trap
    SpecialPowerTemplate = SpecialAbilityBoobyTrap
    StartAbilityRange = 5.0
    PreparationTime = 0
    SpecialObject = BoobyTrap
    MaxSpecialObjects = 100
    SpecialObjectsPersistWhenOwnerDies = Yes
    SpecialObjectsPersistent = Yes
  End
 End
 AddModule ModuleTag_BTUp_Override
  Behavior = UnpauseSpecialPowerUpgrade ModuleTag_BTUp
    SpecialPowerTemplate = SpecialAbilityBoobyTrap
    TriggeredBy = Upgrade_GLAInfantryRebelBoobyTrapAttack
  End
 End
End

If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
Azerom
  • Azerom
  • 61.25% (Friendly)
  • Private Topic Starter
15 years ago
WoW. Awesome Annihilationzh thank you so much for the help. It works great.

To add different abilities to different units do I just use this same format for each?


You are a genius among geniuses Annihilationzh! This script allows Colonel Burton to use Black Lotus capture building! Thank you SOOOO much for your info.


CommandSet AmericaInfantryColonelBurtonCommandSet
  5 = Command_ChinaInfantryBlackLotusCaptureHack
End

Object AmericaInfantryColonelBurton
AddModule SpecialAbility ModuleTag_08_Override
  Behavior = SpecialAbility ModuleTag_08
    SpecialPowerTemplate = SpecialAbilityBlackLotusCaptureBuilding
    UpdateModuleStartsAttack = Yes
    InitiateSound         = BlackLotusVoiceHackBuilding
  End
End
AddModule SpecialAbility ModuleTag_09_Override
  Behavior = SpecialAbilityUpdate ModuleTag_09
    SpecialPowerTemplate  = SpecialAbilityBlackLotusCaptureBuilding
    StartAbilityRange     = 150.0
    UnpackTime            = 6730 ;animation time is 6730 (changing this will scale anim speed)
    PackTime              = 2800 ;animation time is 5800 (changing this will scale anim speed)
    PreparationTime       = 6000 ;time to complete hack once prepared (unpacked)
    SpecialObject         = BinaryDataStream
    DoCaptureFX           = Yes
    PackSound             = BlackLotusPack
    UnpackSound           = BlackLotusUnpack
    TriggerSound          = BlackLotusTrigger
    PrepSoundLoop         = BlackLotusPrepLoop
    AwardXPForTriggering  = 20
    ;SkillPointsForTriggering = ???  -- Dustin, fill me out if you want different balance values.
  End
End
Azerom
  • Azerom
  • 61.25% (Friendly)
  • Private Topic Starter
15 years ago
Why Will this script not work? It crashes the game when I load the map.


CommandSet AmericaInfantryColonelBurtonCommandSet
  3 = Command_GLAInfantryJarmenKellSnipeVehicleAttack
  5 = Command_ChinaInfantryBlackLotusCaptureHack
  End
End
ReplaceWeaponset weaponset_Override
  WeaponSet
    Conditions          = None 
    Weapon              = PRIMARY     ColonelBurtonSniperRifleWeapon
    Weapon              = SECONDARY   GLAJarmenKellVehiclePilotSniperRifle
    AutoChooseSources   = PRIMARY     FROM_PLAYER FROM_SCRIPT FROM_AI
    AutoChooseSources   = SECONDARY   NONE
  End
End
Object AmericaInfantryColonelBurton
AddModule SpecialAbility ModuleTag_08_Override
  Behavior = SpecialAbility ModuleTag_08
    SpecialPowerTemplate = SpecialAbilityBlackLotusCaptureBuilding
    UpdateModuleStartsAttack = Yes
    InitiateSound         = BlackLotusVoiceHackBuilding
  End
End
AddModule SpecialAbility ModuleTag_09_Override
  Behavior = SpecialAbilityUpdate ModuleTag_09
    SpecialPowerTemplate  = SpecialAbilityBlackLotusCaptureBuilding
    StartAbilityRange     = 150.0
    UnpackTime            = 6730 ;animation time is 6730 (changing this will scale anim speed)
    PackTime              = 2800 ;animation time is 5800 (changing this will scale anim speed)
    PreparationTime       = 6000 ;time to complete hack once prepared (unpacked)
    SpecialObject         = BinaryDataStream
    DoCaptureFX           = Yes
    PackSound             = BlackLotusPack
    UnpackSound           = BlackLotusUnpack
    TriggerSound          = BlackLotusTrigger
    PrepSoundLoop         = BlackLotusPrepLoop
    AwardXPForTriggering  = 20
    ;SkillPointsForTriggering = ???  -- Dustin, fill me out if you want different balance values.
  End
End
AddModule PhysicsBehavior ModuleTag_04_Override
  Behavior = PhysicsBehavior ModuleTag_04
    Mass = 5.0
  End
End
AddModule CommandButtonHunt ModuleTag_07_Override
  Behavior = CommandButtonHuntUpdate  ModuleTag_07 ; allows use of command button hunt script with this unit. 
  End
End
End

It worked until I attempted to change the weaponset. Reason for changing the weaponset is because I got the jarmin kell snipe vehicle button on colonel burton, it will let me click on it and says jarmins voiceover. But will not let me snipe a vehicle. I was hopin to keep the knife attack and possibly make it something like so


  WeaponSet
    Conditions          = None 
    Weapon              = PRIMARY     ColonelBurtonSniperRifleWeapon
    Weapon              = SECONDARY   GLAJarmenKellVehiclePilotSniperRifle
    Weapon              = GADGET      ColonelBurtonKnifeWeapon
    AutoChooseSources   = PRIMARY     FROM_PLAYER FROM_SCRIPT FROM_AI
    AutoChooseSources   = SECONDARY   NONE
    AutoChooseSources   = GADGET      NONE

I believe I need to give buton jarmins snipe vehicle weapon to get him to use the skill, I could be wrong.

The Idea behind this is every faction will get one Super Burton built out of their Superweapon instead of their standard hero.

Any thoughts on how to get this script to work?
Azerom
  • Azerom
  • 61.25% (Friendly)
  • Private Topic Starter
15 years ago
Ok this script works. Gives burton Vehicle Snipe, Capture BuildingHack, BoobyTrap.


CommandSet AmericaInfantryColonelBurtonCommandSet
  1  = Command_ColonelBurtonKnifeAttack
  2  = Command_ColonelBurtonTimedDemoCharge
  3  = Command_ChinaInfantryBlackLotusCaptureHack
  4  = Command_ColonelBurtonRemoteDemoCharge
  5  = Command_GLAInfantryJarmenKellSnipeVehicleAttack
  6  = Command_GLAInfantryRebelBoobyTrapAttack
  8  = Command_ColonelBurtonDetonateCharges
  11 = Command_AttackMove
  13 = Command_Guard
  14 = Command_Stop
End

Locomotor ColonelBurtonGroundLocomotor
  Surfaces = GROUND RUBBLE
  Speed = 50                ; in dist/sec
  SpeedDamaged = 20         ; in dist/sec
  TurnRate = 500            ; in degrees/sec
  TurnRateDamaged = 500     ; in degrees/sec
  Acceleration = 100        ; in dist/(sec^2)
  AccelerationDamaged = 50 ; in dist/(sec^2)
  Braking = 100             ; in dist/(sec^2)
  MinTurnSpeed = 0          ; in dist/sec
  ZAxisBehavior = NO_Z_MOTIVE_FORCE
  Appearance = TWO_LEGS
  StickToGround = Yes       ; walking guys aren't allowed to catch huge (or even small) air.
  GroupMovementPriority = MOVES_BACK;   Moves in the back of a group, out of danger.
End

Object AmericaInfantryColonelBurton
  DisplayName         = OBJECT:ColonelBurton
  Side                = America
  EditorSorting       = INFANTRY
  TransportSlotCount  = 1                 ;how many "slots" we take in a transport (0 == not transportable)
  VisionRange         = 150
  ShroudClearingRange = 500
  Prerequisites
    Object = AmericaBarracks
    Object = AmericaStrategyCenter
  End
  BuildCost = 1500
  BuildTime = 20.0          ;in seconds  

  ExperienceValue     = 0 0 0 150  ; Experience point value at each level
  ExperienceRequired  = 0 0 0 600   ; Experience points needed to gain each level
  IsTrainable         = Yes             ; Can gain experience
  CrushableLevel      = 2  ;What am I?:        0 = for infantry, 1 = for trees, 2 = general vehicles
  CommandSet          = AmericaInfantryColonelBurtonCommandSet
  MaxSimultaneousOfType = 1

  WeaponSet
    Conditions          = None 
    Weapon              = PRIMARY     ColonelBurtonSniperRifleWeapon
    Weapon              = SECONDARY   GLAJarmenKellVehiclePilotSniperRifle
    AutoChooseSources   = SECONDARY   NONE
  End
AddModule ModuleTag_Booby_Override
  Behavior = SpecialAbility ModuleTag_Booby
    SpecialPowerTemplate = SpecialAbilityBoobyTrap
    UpdateModuleStartsAttack = Yes
    StartsPaused              = Yes
    InitiateSound = RebelVoiceBoobyTrapInstall
  End
End
AddModule ModuleTag_Trap_Override
  Behavior = SpecialAbilityUpdate ModuleTag_Trap
    SpecialPowerTemplate = SpecialAbilityBoobyTrap
    StartAbilityRange = 5.0
    PreparationTime = 0
    SpecialObject = BoobyTrap
    MaxSpecialObjects = 100
    SpecialObjectsPersistWhenOwnerDies = Yes
    SpecialObjectsPersistent = Yes
  End
End
AddModule ModuleTag_BTUp_Override
  Behavior = UnpauseSpecialPowerUpgrade ModuleTag_BTUp
    SpecialPowerTemplate = SpecialAbilityBoobyTrap
    TriggeredBy = Upgrade_GLAInfantryRebelBoobyTrapAttack
  End
End
AddModule SpecialAbility ModuleTag_08_Override
  Behavior = SpecialAbility ModuleTag_08
    SpecialPowerTemplate = SpecialAbilityBlackLotusCaptureBuilding
    UpdateModuleStartsAttack = Yes
    InitiateSound         = BlackLotusVoiceHackBuilding
  End
End
AddModule SpecialAbility ModuleTag_09_Override
  Behavior = SpecialAbilityUpdate ModuleTag_09
    SpecialPowerTemplate  = SpecialAbilityBlackLotusCaptureBuilding
    StartAbilityRange     = 150.0
    UnpackTime            = 6730 ;animation time is 6730 (changing this will scale anim speed)
    PackTime              = 2800 ;animation time is 5800 (changing this will scale anim speed)
    PreparationTime       = 6000 ;time to complete hack once prepared (unpacked)
    SpecialObject         = BinaryDataStream
    DoCaptureFX           = Yes
    PackSound             = BlackLotusPack
    UnpackSound           = BlackLotusUnpack
    TriggerSound          = BlackLotusTrigger
    PrepSoundLoop         = BlackLotusPrepLoop
    AwardXPForTriggering  = 20
    ;SkillPointsForTriggering = ???  -- Dustin, fill me out if you want different balance values.
  End
End
AddModule ModuleTag_07_Override
  Behavior = CommandButtonHuntUpdate  ModuleTag_07 ; allows use of command button hunt script with this unit. 
  End
End
AddModule ModuleTag_08_Override
  Behavior = WeaponBonusUpgrade ModuleTag_08
    TriggeredBy = Upgrade_GLAAPBullets
  End
End
End

I tried adding his knife to tertiary but it would not take. Is there anyway to add his combat knife to TERTIARY and get it to work with the button?







Annihilationzh
15 years ago
You need to edit his knife button.

CommandButton Command_ColonelBurtonKnifeAttack
  Command                 = FIRE_WEAPON
  WeaponSlot              = TERTIARY ;SECONDARY
  Options                 = OK_FOR_MULTI_SELECT NEED_TARGET_ENEMY_OBJECT NEED_TARGET_NEUTRAL_OBJECT CONTEXTMODE_COMMAND
  TextLabel               = CONTROLBAR:KnifeAttack
  ButtonImage             = SSKnifeAttack
  CursorName              = StabAttack
  InvalidCursorName       = StabAttackInvalid
  ButtonBorderType        = ACTION ; Identifier for the User as to what kind of button this is
  DescriptLabel           = CONTROLBAR:ToolTipUSAFireBurtonKnifeAttack
  UnitSpecificSound       = ColonelBurtonVoiceModeKnife
End

If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
Azerom
  • Azerom
  • 61.25% (Friendly)
  • Private Topic Starter
15 years ago
Thanks Annihilationzh. What .ini files carries those scripts? I looked for something like that but could not find it anywhere.

Also, everytime I add this into the script It crashes. I wanted to add the apammo and the boobytrap to this. But whenever I put it into the script it crashes


  SelectPortrait         = SABurton_L
  ButtonImage            = SABurton
  UpgradeCameo1 = Upgrade_AmericaAdvancedTraining
  UpgradeCameo2 = Upgrade_AmericaChemicalSuits
End


  SelectPortrait         = SACIAOff_L
  ButtonImage            = SACIAOff_L
  UpgradeCameo1 = Upgrade_AmericaAdvancedTraining
  UpgradeCameo2 = Upgrade_AmericaChemicalSuits
  UpgradeCameo3 = Upgrade_GLAInfantryRebelBoobyTrapAttack
  UpgradeCameo4 = Upgrade_GLAAPBullets
End

Is there a specific order the different scripts need to go in? I put it right below "Object AmericaInfantryColonelBurton"

Also, whenever i change the build cost/time it only changes the cost not the time. I wanted to make it

2500 cost 60.0 seconds build time. but it only changes the cost.
Annihilationzh
15 years ago

Also, whenever i change the build cost/time it only changes the cost not the time. I wanted to make it

2500 cost 60.0 seconds build time. but it only changes the cost.


I think I explain this to someone once a month. This belongs on a map.ini FAQ.

You can't change either of them. The cost will appear, but it won't charge you the full amount, and the build time just won't work.

As for your other scripts, that End shouldn't be there. It closes references to C.Burton, but just afterwards, you're adding modules to him. So the game won't have clue what you're adding modules to.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
Azerom
  • Azerom
  • 61.25% (Friendly)
  • Private Topic Starter
15 years ago
Ah Thank you. I greatly appreciate the help you have been giving me and Thank you greatly for the quick responses. You are a lifesaver.

Ok. I got the CIA portrait when I click on Burton. How would I get the CIA portrait to show up in a build. For example in the barracks where you click on burton, how to get that to show CIA agent.

And heres a tricky one, I tried changing burton to cia agent so it would create the cia agent instead of burton, but the game crashed. is there any unique model I can use instead of burton for this unit that won't crash the game?
Annihilationzh
15 years ago
Replace burtons build commandbutton and change the image with the one of the CIA agent.

You can use any model to replace burton's model, as long as your syntax is correct.
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
Azerom
  • Azerom
  • 61.25% (Friendly)
  • Private Topic Starter
15 years ago
As soon as i add "Command_ConstructAmericaInfantryCIAOfficer" to the barracks it crashes the game.


CommandSet AmericaBarracksCommandSet
  1 = Command_ConstructAmericaInfantryRanger
  2 = Command_ConstructAmericaInfantryMissileDefender
  3 = Command_ConstructAmericaInfantryCIAAgent
  4 = Command_ConstructAmericaInfantryPathfinder
  5 = Command_UpgradeAmericaAdvancedTraining
  6 = Command_UpgradeAmericaChemicalSuits
  7 = Command_UpgradeAmericaRangerFlashBangGrenade 
  8 = Command_UpgradeAmericaRangerCaptureBuilding
  9 = Command_UpgradeGLAInfantryRebelBoobyTrapAttack
 10 = Command_UpgradeGLAAPBullets
 13 = Command_SetRallyPoint
 14 = Command_Sell
End

CommandSet AmericaInfantryCIAAgentCommandSet
  1  = Command_GLAInfantryJarmenKellSnipeVehicleAttack
  2  = Command_CIAAgentTimedDemoCharge
  3  = Command_AmericaRangerCaptureBuilding
  4  = Command_CIAAgentRemoteDemoCharge
  6  = Command_GLAInfantryRebelBoobyTrapAttack
  8  = Command_CIAAgentDetonateCharges
  11 = Command_AttackMove
  13 = Command_Guard
  14 = Command_Stop
End

Object AmericaInfantryCIAOfficer
  SelectPortrait = SACIAOff_L
  ButtonImage = SACIAOff_L
  UpgradeCameo1 = Upgrade_AmericaAdvancedTraining
  UpgradeCameo2 = Upgrade_AmericaChemicalSuits
  UpgradeCameo3 = Upgrade_GLAInfantryRebelBoobyTrapAttack
  UpgradeCameo4 = Upgrade_GLAAPBullets

  WeaponSet
    Conditions          = None 
    Weapon              = PRIMARY     ColonelBurtonSniperRifleWeapon
    Weapon              = SECONDARY   GLAJarmenKellVehiclePilotSniperRifle
    AutoChooseSources    = SECONDARY   NONE
  End
AddModule ModuleTag_02_Override
  Body = ActiveBody ModuleTag_02
    MaxHealth       = 250.0
    InitialHealth   = 250.0
  End
End
AddModule ModuleTag_Booby_Override
  Behavior = SpecialAbility ModuleTag_Booby
    SpecialPowerTemplate = SpecialAbilityBoobyTrap
    UpdateModuleStartsAttack = Yes
    StartsPaused              = Yes
    InitiateSound = RebelVoiceBoobyTrapInstall
  End
End
AddModule ModuleTag_Trap_Override
  Behavior = SpecialAbilityUpdate ModuleTag_Trap
    SpecialPowerTemplate = SpecialAbilityBoobyTrap
    StartAbilityRange = 5.0
    PreparationTime = 0
    SpecialObject = BoobyTrap
    MaxSpecialObjects = 100
    SpecialObjectsPersistWhenOwnerDies = Yes
    SpecialObjectsPersistent = Yes
  End
End
AddModule ModuleTag_BTUp_Override
  Behavior = UnpauseSpecialPowerUpgrade ModuleTag_BTUp
    SpecialPowerTemplate = SpecialAbilityBoobyTrap
    TriggeredBy = Upgrade_GLAInfantryRebelBoobyTrapAttack
  End
End
AddModule ModuleTag_18_Override
  Behavior = SpecialAbility ModuleTag_18
    SpecialPowerTemplate      = SpecialAbilityRangerCaptureBuilding
    UpdateModuleStartsAttack  = Yes
    StartsPaused              = Yes ; Unpaused by upgrade module
    InitiateSound         = RangerVoiceCapture
  End
End
AddModule ModuleTag_19_Override
  Behavior = SpecialAbilityUpdate ModuleTag_19
    SpecialPowerTemplate  = SpecialAbilityRangerCaptureBuilding
    StartAbilityRange  = 150.0
    UnpackTime            = 3000  ; (changing this will scale anim speed)
    PreparationTime       = 6000 ; time to complete hack once prepared (changing this will scale anim speed)
    PackTime              = 2000  ; (changing this will scale anim speed)
    DoCaptureFX           = Yes
    AwardXPForTriggering  = 15
    ;SkillPointsForTriggering = ???  -- Dustin, fill me out if you want different balance values.
  End
End
AddModule ModuleTag_20_Override
  Behavior = UnpauseSpecialPowerUpgrade ModuleTag_20
    SpecialPowerTemplate = SpecialAbilityRangerCaptureBuilding
    TriggeredBy = Upgrade_InfantryCaptureBuilding
  End
End
AddModule ModuleTag_07_Override
  Behavior = CommandButtonHuntUpdate  ModuleTag_07 ; allows use of command button hunt script with this unit. 
  End
End
AddModule ModuleTag_08_Override
  Behavior = WeaponBonusUpgrade ModuleTag_08
    TriggeredBy = Upgrade_GLAAPBullets
  End
End
End
Annihilationzh
15 years ago
EDIT: ok... you've changed everything. I'll take a look.

EDIT2: Command_ConstructAmericaInfantryCIAAgent does not exist. If you're going to use it, you have to create it. You have to create a CommandButton (you can find examples in CommandButton.ini).
If you need help, post in the forum. You'll get help a lot faster than if you send me a PM.

I reject all buddy requests. I don't think 'buddy' needs to be made official. It's not like you're marrying me.
Azerom
  • Azerom
  • 61.25% (Friendly)
  • Private Topic Starter
15 years ago
As so?:

CommandButton Command_ConstructAmericaInfantryCIAAgent
  Command       = UNIT_BUILD
  Object        = AmericaInfantryCIAAgent
  TextLabel     = CONTROLBAR:ConstructAmericaInfantryCIAAgent
  ButtonImage   = SACIAOff_L
  ButtonBorderType        = BUILD ; Identifier for the User as to what kind of button this is
  DescriptLabel           = CONTROLBAR:ToolTipUSABuildCIAAgent
End

this works and it doesn't. it doesnt crash the game, put a button in the barracks but not a usable button. and with the wrong image.
Azerom
  • Azerom
  • 61.25% (Friendly)
  • Private Topic Starter
15 years ago
ah i got it


CommandButton Command_ConstructAmericaInfantryCIAAgent
  Command       = UNIT_BUILD
  Object        = AmericaInfantryCIAOfficer
  TextLabel     = CONTROLBAR:ConstructAmericaInfantryCIAAgent
  ButtonImage   = SACIAOff
  ButtonBorderType        = BUILD ; Identifier for the User as to what kind of button this is
  DescriptLabel           = CONTROLBAR:ToolTipUSABuildCIAAgent
End

however it does not put the proper button image in the barracks slot. it only shows a pic of the "build barracks" button
Azerom
  • Azerom
  • 61.25% (Friendly)
  • Private Topic Starter
15 years ago
Here's a tricky question, I am sure it is do-able but haven't a clue as to how.

I got this to work exactly how I wanted it to


CommandButton Command_GLAInfantryJarmenKellSnipeVehicleAttack
  Command                 = FIRE_WEAPON
  WeaponSlot              = TERTIARY
  Options                 = OK_FOR_MULTI_SELECT NEED_TARGET_ENEMY_OBJECT CONTEXTMODE_COMMAND
  Upgrade                 = None
  TextLabel               = CONTROLBAR:SniperAttack
  ButtonImage             = SSSniperAttack
  CursorName              = SnipeVehicle
  InvalidCursorName       = GenericInvalid
  ButtonBorderType        = ACTION ; Identifier for the User as to what kind of button this is
  DescriptLabel           = CONTROLBAR:ToolTipGLAFireJarmenKellVehicleSnipe
  UnitSpecificSound       = ColonelBurtonVoiceModeKnife
End

  WeaponSet
    Conditions          = None 
    Weapon              = PRIMARY     ColonelBurtonSniperRifleWeapon
    Weapon              = SECONDARY   ColonelBurtonKnifeWeapon
    Weapon              = TERTIARY    GLAJarmenKellVehiclePilotSniperRifle
    AutoChooseSources    = SECONDARY   NONE
    AutoChooseSources    = TERTIARY    NONE
  End

But is there a way to get the "GLAJarmenKellVehiclePilotSniperRifle" to use the same animation from "ColonelBurtonSniperRifleWeapon"?

I know it has something to do with


    ; Firing animation
    ConditionState      = FIRING_A
      Animation         = AIHERO_SKL.AIHERO_ATA
      AnimationMode     = ONCE
      AnimationSpeedFactorRange = 1.5 1.5
      TransitionKey     = TRANS_FiringA
    End

but how do i combine the two?
alisontin
15 years ago
Wow this is a cool thread, it helps someone who has a problem and their quick response is great.