Is the SlavedUpdate behaviour tied to upgrades?, Tying to add multiple drones to one unit. |
Is the SlavedUpdate behaviour tied to upgrades?, Tying to add multiple drones to one unit. |
18 Mar 2018, 16:26
Post
#1
|
|
Group: Members Posts: 53 Joined: 17 July 2015 Member No.: 11785 |
Hello again,
I've been trying to create a vehicle that can add a theoretically infinite amount of slaved drones to itself. I tried doing this using a simple command que with regular UNIT_BUILD Commands. Unfortunately it seems that the units that then come from the unit, even if they share most of the slaved code of american drones and their lack of a commandset, don't actually behave like drones. They can still be given orders and they don't follow their producer. Is the slavedupdate behavior tied to upgrades imposed on the producer? All american vehicles require a upgrade to spawn the droid, and the droids remove the upgrade upon death. If the slavedupdate is indeed dependent on upgrades, does that mean removing a upgrade while the slave is alive will remove the slave? Otherwise i could just immediately purchase and remove the upgrade to keep the slave and allow the unit to make another one potentially. Here's the drone's construction button and object code: CODE CommandButton CyberneticFederationCommand_ConstructAntiVehicleDrone Command = UNIT_BUILD Object = CyberneticFederationAntiVehicleDrone TextLabel = CONTROLBAR:ConstructAmericaVehicleSentryDrone ButtonImage = SAsentry ButtonBorderType = BUILD ; Identifier for the User as to what kind of button this is DescriptLabel = CONTROLBAR:ToolTipUSABuildSentryDrone End Object CyberneticFederationAntiVehicleDrone ; *** ART Parameters *** SelectPortrait = SAsentry_L ButtonImage = SAsentry ;UpgradeCameo1 = Upgrade_AmericaDroneArmor Draw = W3DTankDraw ModuleTag_01 DefaultConditionState Model = AVGuardDr Turret = Turret WeaponFireFXBone = PRIMARY TurretMS WeaponMuzzleFlash = PRIMARY TurretFX End TrackMarks = EXTnkTrack.tga OkToChangeModelColor = Yes End ; ***DESIGN parameters *** DisplayName = OBJECT:GuardianDrone Side = CyberneticFederation EditorSorting = VEHICLE TransportSlotCount = 2 ;how many "slots" we take in a transport (0 == not transportable) WeaponSet Conditions = None Weapon = PRIMARY CrusaderTankGun End ArmorSet Conditions = None Armor = SentryDroneArmor DamageFX = TruckDamageFX End BuildCost = 700 BuildTime = 8.0 ;in seconds VisionRange = 150 ShroudClearingRange = 150 Prerequisites Object = CyberneticFederationWarFactory End ExperienceValue = 50 100 150 400 ;Experience point value at each level IsTrainable = No ;CommandSet = AmericaVehicleSentryDroneCommandSet ; *** AUDIO Parameters *** ; *** AUDIO Parameters *** VoiceSelect = SentryDroneVoiceSelect VoiceMove = SentryDroneVoiceMove VoiceGuard = SentryDroneVoiceMove VoiceAttack = SentryDroneVoiceMove SoundMoveStart = SentryDroneMoveStart UnitSpecificSounds ; These have the syntax of SomeNameSomewhereInCode = SomeNameSomewhereInLookupINIs TurretMoveStart = NoSound TurretMoveLoop = TurretMoveLoop End ; *** ENGINEERING Parameters *** RadarPriority = UNIT KindOf = PRELOAD SELECTABLE CAN_ATTACK CAN_CAST_REFLECTIONS VEHICLE SCORE DRONE NO_SELECT Body = ActiveBody ModuleTag_02 MaxHealth = 200.0 InitialHealth = 200.0 End Behavior = AIUpdateInterface ModuleTag_03 Turret TurretTurnRate = 60 // turn rate, in degrees per sec ControlledWeaponSlots = PRIMARY End AutoAcquireEnemiesWhenIdle = Yes End Locomotor = SET_NORMAL BasicTankLocomotor Behavior = PhysicsBehavior ModuleTag_04 Mass = 50.0 End Behavior = SlowDeathBehavior ModuleTag_05 DestructionDelay = 500 FX = FINAL FX_GenericTankDeathExplosion End ; Behavior = MaxHealthUpgrade ModuleTag_06 ; TriggeredBy = Upgrade_AmericaDroneArmor ; AddMaxHealth = 50.0 ; ChangeType = ADD_CURRENT_HEALTH_TOO ;Choices are PRESERVE_RATIO, ADD_CURRENT_HEALTH_TOO, and SAME_CURRENTHEALTH ; End Behavior = FXListDie ModuleTag_07 DeathFX = FX_GenericTankDeathEffect End Behavior = CreateObjectDie ModuleTag_08 CreationList = OCL_GenericTankDeathEffect End Behavior = CreateCrateDie ModuleTag_09 CrateData = SalvageCrateData ;CrateData = EliteTankCrateData ;CrateData = HeroicTankCrateData End Behavior = TransitionDamageFX ModuleTag_10 ReallyDamagedParticleSystem1 = Bone:Smoke RandomBone:Yes PSys:SmallLightSmokeColumn End ; Behavior = StealthUpdate ModuleTag_11 ; StealthDelay = 2000 ; msec ; StealthForbiddenConditions = FIRING_PRIMARY ; HintDetectableConditions = IS_FIRING_WEAPON ; FriendlyOpacityMin = 50.0% ; FriendlyOpacityMax = 100.0% ; InnateStealth = Yes ; OrderIdleEnemiesToAttackMeUponReveal = Yes ; End Behavior = SlavedUpdate ModuleTag_06 GuardMaxRange = 75 ;How far away from master I'm allowed when master is idle (doesn't wander) GuardWanderRange = 75 ;How far away I'm allowed to wander from master while guarding. AttackRange = 120 ;How far away from master I'm allowed when master is attacking a target. AttackWanderRange = 60 ;How far I'm allowed to wander from target. ScoutRange = 120 ;How far away from master I'm allowed when master is moving. ScoutWanderRange = 60 ;How far I'm allowed to wander from scout point. DistToTargetToGrantRangeBonus = 20 ;How close I have to be to the master's target in order to grant master a range bonus. StayOnSameLayerAsMaster = Yes End Behavior = FlammableUpdate ModuleTag_21 AflameDuration = 5000 ; If I catch fire, I'll burn for this long... AflameDamageAmount = 3 ; taking this much damage... AflameDamageDelay = 500 ; this often. End Geometry = BOX GeometryMajorRadius = 15.0 GeometryMinorRadius = 10.0 GeometryHeight = 10.0 GeometryIsSmall = Yes Shadow = SHADOW_VOLUME ShadowSizeX = 89 ; minimum elevation angle above horizon. Used to limit shadow length End |
|
|
22 Mar 2018, 2:57
Post
#2
|
|
Group: Members Posts: 53 Joined: 17 July 2015 Member No.: 11785 |
After some messing around, i found out that the slavedAI update does seem to require a upgradeOCL from the main object, as a battle droid produced through addling the commandbuttons does not act slaved.
I then tried to use StatusBitsUpgrade behaviour to remove the upgrade as soon as it finishes so i can potentially upgrade the unit a infinite amounts of time. This works for the first drone produced, clearing the upgrade and allowing another to be constructed, at which point it does not remove the upgrade. Does anyone know a way to remove a upgrade once it's bought that repeats infinitely? It seems that is the key to this problem. |
|
|
22 Mar 2018, 21:32
Post
#3
|
|
Group: Members Posts: 53 Joined: 17 July 2015 Member No.: 11785 |
Found a way to do it by spawning a object that immediately dies and removes the upgrade.
Infinite droids are mine. |
|
|
Lo-Fi Version | Time is now: 27 April 2024 - 8:12 |