GeneralJoined: 5/13/2013(UTC) Posts: 1,537  Location: Right Behind You  Thanks: 574 times Was thanked: 166 time(s) in 144 post(s)
  
 
     | 
    
        
            
	      
                I'm trying to give the Demolitions General's RPG Troopers the Tank Hunter's TNT ability, but whenever I click the button and hover over the target, the icon just says I can't place it there and does nothing.  Here's the code I've added to the RPG Trooper: Code:  Behavior = SpecialAbility ModuleTag_TNT01
    SpecialPowerTemplate = SpecialAbilityTankHunterTNTAttack
    UpdateModuleStartsAttack = Yes
    InitiateSound = TankHunterVoiceTNT
  End
  Behavior = SpecialAbilityUpdate ModuleTag_TNT02
    SpecialPowerTemplate = SpecialAbilityTankHunterTNTAttack
    StartAbilityRange = 5.0
    PreparationTime = 0
    SpecialObject = TNTStickyBomb
    MaxSpecialObjects = 8
    SpecialObjectsPersistWhenOwnerDies = Yes ;Charges are removed instantly when owner dies (nobody can detonate).
    SpecialObjectsPersistent = Yes          ;Charges are persistent till lifetime expires or owner detonates them.
    UniqueSpecialObjectTargets = Yes        ;This prevents multiple charges placed on the same object.
    FleeRangeAfterCompletion = 100.0         ;Runs away after finishing ability
  End
And the CommandSet code:
CommandSet Demo_GLAInfantryTunnelDefenderCommandSet
  1 = Command_ChinaInfantryTankHunterTNTAttack
  11 = Command_AttackMove
  13 = Command_Guard
  14 = Command_Stop
End
CommandSet Demo_GLAInfantryTunnelDefenderCommandSetUpgrade
  1 = Command_ChinaInfantryTankHunterTNTAttack
  2 = Demo_Command_TertiarySuicide
  11 = Command_AttackMove
  13 = Command_Guard
  14 = Command_Stop
End
 
    | 
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.  | 
            
 
        
    
    | 
         
             
     | 
    
         
            
         
     | 
    | 
        
     | 
        
        
        
            
        
            
            
    
        
 GeneralJoined: 8/2/2008(UTC) Posts: 1,779   Thanks: 26 times Was thanked: 476 time(s) in 331 post(s)
  
 
     | 
    
        
            
	      
                I can't see anything wrong with what you've got there. The problem you have makes me think you've likely got a mix-up somewhere and the unit you're testing is not the one with the ability in it's code.    | 
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.  | 
            
 
        
    
    
        
              1 user thanked Annihilationzh for this useful post.  
     | 
    
        
     | 
    | 
        
     | 
        
        
        
    
        
            
            
    
        
 GeneralJoined: 5/13/2013(UTC) Posts: 1,537  Location: Right Behind You  Thanks: 574 times Was thanked: 166 time(s) in 144 post(s)
  
 
     | 
    
        
            
	      
                Well I looked, you're correct! I somehow managed to apply the code to the STINGER SOLDIER and not the RPG Trooper and didn't even notice! Silly me! XD    | 
Any old friends still on here can add me on discord @jcdenton2187. I'm far more likely to respond there.  | 
            
 
        
    
    | 
         
             
     | 
    
         
            
         
     | 
    | 
        
     | 
        
        
        
    
                           
    
| Users browsing this topic | 
| 
 
Guest (2) 
 | 
    
        Forum Jump
         
    
    You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.