Jump to content

catrhino1

Members
  • Content count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About catrhino1

  • Rank
    Recruit
  1. Hi there, I've been looking to do this for a while - in the Contra Mod there's a selectable fixed-wing air unit called the C27J Spartan which is able to parachute infantry. The coding for that aircraft basically involved making a weaponset that spawned infantry instead of dropping bombs, so you can effectively parachute free infantry by ordering the aircraft to force-attack a location. The infantry would then automatically "reload" inside the aircraft at the airfield. I would like to make a similar unit such that it parachutes infantry that have been garrisoned inside previously; i.e. a C27 that you load up with infantry (just like a chinook) at the airfield and is then able to deploy those infantry via parachute at a location of your choice. I've been modding for quite some time now and am pretty experienced with editing .ini coding but I honestly wouldn't know where to start with this one. I've tried looking at the code for scripted drops and the code for the chinook's fastrope ability, but that hasn't really been useful at all! If anyone could give me a hand, that would be great! Cheers.
  2. catrhino1

    Modding Question

    I just posted a set of code for an AT Squad here: http://forums.cncnz.com/topic/17237-squad-help/ Good luck - it's mostly a copy-and paste job of the Angry Mob and it works well for me. You might need to fine tune it a bit - it's not perfect!
  3. catrhino1

    Squad Help

    It's definitely possible - I've done it successfully. You need to make a "nexus" unit that is basically the selectable part of the squad, here's some INI code for an Anti-Tank Squad that I made: ;------------------------------------------------------------------------------ Object AmericaInfantryATSquadNexus ;**** ART Parameters ************************** SelectPortrait = ATSquad ButtonImage = ATSquad UpgradeCameo1 = Upgrade_AmericaRangerFlashBangGrenade UpgradeCameo2 = Upgrade_AmericaAdvancedTraining UpgradeCameo3 = Upgrade_InfantryCaptureBuilding UpgradeCameo4 = Upgrade_AmericaChemicalSuits ;UpgradeCameo5 = NONE Draw = W3DModelDraw ModuleTag_01 OkToChangeModelColor = Yes DefaultConditionState Model = None ; Model = AVBomber_B End End ;****DESIGN parameters ************************** DisplayName = OBJECT:AntiTankSquad Side = America RadarPriority = NOT_ON_RADAR EditorSorting = INFANTRY TransportSlotCount = 0 ;how many "slots" we take in a transport (0 == not transportable) WeaponSet Conditions = None Weapon = PRIMARY GLAAngryMobNexusHarmlessWeapon Weapon = SECONDARY GLAAngryMobNexusHarmlessWeapon Weapon = TERTIARY GLAAngryMobNexusHarmlessWeapon End ArmorSet Conditions = None Armor = InvulnerableAllArmor DamageFX = None End BuildCost = 1000 BuildTime = 15.0 ;in seconds VisionRange = 150 ; it can scout for the spawn ShroudClearingRange = 0 ; Prerequisites ; Object = GLABarracks ; Object = GLAPalace ; End ExperienceValue = 5 5 5 5 ;Experience point value at each level IsTrainable = No CommandSet = AmericaInfantryMissileDefenderCommandSet; ;**** AUDIO Parameters ***************************** VoiceSelect = MissileDefenderVoiceSelect VoiceMove = MissileDefenderVoiceMove VoiceGuard = MissileDefenderVoiceMove VoiceAttack = MissileDefenderVoiceAttack VoiceAttackAir = MissileDefenderVoiceAttack VoiceFear = MissileDefenderVoiceFear UnitSpecificSounds VoiceGarrison = MissileDefenderVoiceGarrison VoiceCreate = MissileDefenderVoiceCreate VoiceEnter = MissileDefenderVoiceMove VoiceGetHealed = MissileDefenderVoiceMove End ;**** ENGINEERING Parameters ****************************** RadarPriority = UNIT KindOf = PRELOAD CAN_ATTACK INFANTRY MOB_NEXUS ATTACK_NEEDS_LINE_OF_SIGHT NO_COLLIDE SELECTABLE SCORE Body = ImmortalBody ModuleTag_02 MaxHealth = 99999.0 InitialHealth = 99999.0 End Behavior = AIUpdateInterface ModuleTag_03 AutoAcquireEnemiesWhenIdle = Yes End Locomotor = SET_NORMAL AngryMobNexusLocomotor ;Important! don't make the Nexus any faster! Locomotor = SET_WANDER AngryMobNexusLocomotor ;Important! don't make the Nexus any faster! Locomotor = SET_PANIC AngryMobNexusLocomotor ;Important! don't make the Nexus any faster! ; Locomotor = SET_NORMAL WanderHumanLocomotor ;Important! don't make the Nexus any faster! ; Locomotor = SET_WANDER WanderHumanLocomotor ;Important! don't make the Nexus any faster! ; Locomotor = SET_PANIC WanderHumanLocomotor ;Important! don't make the Nexus any faster! Behavior = PhysicsBehavior ModuleTag_04 Mass = 50.0 End Behavior = SpawnBehavior ModuleTag_05 SpawnNumber = 8 ;10 SpawnReplaceDelay = 30000 ; 30 seconds SpawnTemplateName = AmericaInfantryMissileDefenderSA SpawnTemplateName = AmericaInfantryMissileDefenderSA2 SpawnTemplateName = AmericaInfantryMachineGunnerSA SpawnTemplateName = AmericaInfantryRangerSA ExitByBudding = Yes;! InitialBurst = 8 ;5; the first set of 5 will not delay OneShot = No AggregateHealth = Yes SlavesHaveFreeWill = No End Behavior = QueueProductionExitUpdate ModuleTag_06 UnitCreatePoint = X: 0.0 Y: 0.0 Z:0.0 NaturalRallyPoint = X: 0.0 Y: 0.0 Z:0.0 ExitDelay = 5000 ; 5 sec InitialBurst = 5 ; the first set of 5 will not delay End Behavior = DestroyDie ModuleTag_07 DeathTypes = ALL End Behavior = SpecialAbility ModuleTag_08 SpecialPowerTemplate = SpecialAbilityMissileDefenderLaserGuidedMissiles UpdateModuleStartsAttack = Yes InitiateSound = MissileDefenderVoiceAttackLaser End Behavior = SpecialAbilityUpdate ModuleTag_09 SpecialPowerTemplate = SpecialAbilityMissileDefenderLaserGuidedMissiles StartAbilityRange = 200.0 AbilityAbortRange = 250.0 ;If the target moves outside this range, abort. PreparationTime = 1000 PersistentPrepTime = 500 SpecialObject = LaserBeam SpecialObjectAttachToBone = Muzzle01 End ;Added by JMC on 7/12/03 so that the skirmish AI can tell the missile defenders to hunt using ;the laser guided missiles. Behavior = CommandButtonHuntUpdate ModuleTag_CBHunt ; allows use of command button hunt script with this unit. End Geometry = CYLINDER GeometryMajorRadius = 1.0 GeometryMinorRadius = 1.0 GeometryHeight = 1.0 GeometryIsSmall = Yes Shadow = SHADOW_VOLUME End Most of this is just copy&paste of the Angry Mob - but what's really important is the "SpawnBehaviour ModuleTag_05" which sets what units the squad is comprised of. You can see here that I've created a squad of 8 soldiers - the reason that the missile defender appears twice is so that there are 4 missile defenders, 2 rangers and 2 machine gunners (which are just rangers with a large machine gun weapon). Also notice that the units have the "SA" suffix that I added to distinguish between them and the normal rangers/missile defenders. Each one of those names corresponds to a specific code for an infantry unit (note that the SA2 and SA missile defenders are two separate sets of coding). I'm fairly sure that in the code for those units I removed the "KINDOF = SELECTABLE" engineering parameter so that you can't select individual units within the squad. Also note that there's some redundant code in this one that isn't actually in use (with a semi-colon in front of the line of code). Hope that helps! Good Luck!
×