hamed_GLA
  • hamed_GLA
  • 50.25% (Neutral)
  • Private Topic Starter
7 years ago
Hi to all.
I use tibed2 to modify my game ( zero hour). I am wonder How add weapons to an unit.
for example Gla RPG trooper with 2 kind of RPG: 1-nuke missle luancher (normal RPG with nuke warhead) 2-neutron RPG
how the warhead of a weapon changes ?
and
how add new weapon to unit with switch for change between them?
sorry for my bad english Genarals. cuz I am from a GLA country.😉
Sponsor
UTD^Force
7 years ago
Hey, welcome to our community.
I recommend checking this out before you start modding the game.

http://www.cnclabs.com/forums/cnc_postst9305_Getting-starting--Modding.aspx 

After you have a general idea of what ini code is and how it functions, you will be able to change weapons and much more.
To make a weapon be changed by a switch, you should check the nuke launcher's neutron/nuclear weapon or the scud launcher's scud/demo missile.
Good luck.
A Muslim, ask me anything about Islam if you want
UTD^Force
Moderator and former map reviewer
Big fan of C&C Labs
hamed_GLA
  • hamed_GLA
  • 50.25% (Neutral)
  • Private Topic Starter
7 years ago
thanks a lot . Now I can do every thing I want but the weapon function. the weapon characteristic confused me and I can not build an RPG with Neutron warhead ( like nuke cannon). In The past I easily made weapons for red alert 1&2 but for zero hour I just stuck here!.
UTD^Force
7 years ago
You can check the code for the nuke launcher's weapon in weapon.ini (you might need to check the weapon's OCL from ObjectCreationList.ini, I'm not sure) and then checking the weapon's object from WeaponObject.ini if you do that, your problem should be solved. If you don't manage to do it, I will give you the code if I get free time.
A Muslim, ask me anything about Islam if you want
UTD^Force
Moderator and former map reviewer
Big fan of C&C Labs
hamed_GLA
  • hamed_GLA
  • 50.25% (Neutral)
  • Private Topic Starter
7 years ago
very impressive. thank you man. It worked
UTD^Force
7 years ago
I'm not really sure if you have to make another one or not.
The tunnel defender uses only one weapon and it can attack airborne vehicles.
This is the weapon he (or she, lol) uses.
;------------------------------------------------------------------------------
Weapon TunnelDefenderRocketWeapon
  PrimaryDamage               = 40.0            
  PrimaryDamageRadius         = 5.0      
  ScatterRadiusVsInfantry     = 10.0     ;When this weapon is used against infantry, it can randomly miss by as much as this distance.
  AttackRange                 = 175.0
  MinimumAttackRange          = 5.0 ; Rockets take some distance to target, and you don't want them to blow up in your face.
  DamageType                  = INFANTRY_MISSILE  ; ignored for projectile weapons
  DeathType                   = EXPLODED
  WeaponSpeed                 = 600               ; ignored for projectile weapons
  ProjectileObject            = TunnelDefenderMissile
  ProjectileExhaust           = MissileExhaust
  VeterancyProjectileExhaust  = HEROIC HeroicMissileExhaust
  RadiusDamageAffects         = ALLIES ENEMIES NEUTRALS
  ScatterRadius               = 0      ; This weapon will scatter somewhere within a circle of this radius, instead of hitting someone directly
  DelayBetweenShots           = 1000  ; time between shots, msec
  ClipSize                    = 0             ; how many shots in a Clip (0 == infinite)
  ClipReloadTime              = 0    ; how long to reload a Clip, msec
  AutoReloadsClip             = Yes 
  FireSound                   = RPGTrooperWeapon
  FireFX                      = None
  ProjectileDetonationFX      = WeaponFX_RocketBuggyMissileDetonation
  ProjectileCollidesWith      = STRUCTURES
  AntiAirborneVehicle         = Yes
  AntiAirborneInfantry        = Yes
  AntiAirborneVehicle         = Yes ; I have no idea why he has this twice
  WeaponBonus = PLAYER_UPGRADE DAMAGE 125% ; AP rocket upgrade
End

EDIT: I've just checked that you have edited your reply, I'm glad that you could solve your problem yourself.
A Muslim, ask me anything about Islam if you want
UTD^Force
Moderator and former map reviewer
Big fan of C&C Labs