ztz2019 1 Posted June 18, 2018 I want to give Cmdo a new SP just like boobytrap to make an ocl on Tibfield, but it can't fire the SpecialWeapon if on Tibfield, but run's ok on all other obj. such as Tib, structures, husks or bridge. Cmdo's code: <SpecialPowerDispatchSpecialPower id="ModuleTag_BoobyTrapDispatch" SpecialPowerTemplate="SpecialPower_PlaceSeedDispatch"> <SpecialPower SpecialPowerTemplate="SpecialPower_PlaceSeedAtTiberiumField" /> </SpecialPowerDispatchSpecialPower> <SpecialPower id="ModuleTag_BoobyTrapTechBuilding" SpecialPowerTemplate="SpecialPower_PlaceSeedAtTiberiumField" UpdateModuleStartsAttack="true" /> <WeaponFireSpecialAbilityUpdate id="ModuleTag_TargetedSensorPodUpdate" SpecialPowerTemplate="SpecialPower_PlaceSeedAtTiberiumField" SpecialWeapon="MutantPlaceSeedWeapon" StartAbilityRange="5" UnpackTime="1.5s" PackTime="1.0s" /> Wpn code: <WeaponTemplate id="MutantPlaceSeedWeapon" Name="MutantPlaceSeedWeapon" AttackRange="100.0" WeaponSpeed="800" MinWeaponSpeed="800" MaxWeaponSpeed="810" AcceptableAimDelta="20d" AutoReloadsClip="AUTO" ClipSize="0" AntiMask="ANTI_GROUND" CanFireWhileMoving="true"> <FiringDuration MinSeconds="1.1s" MaxSeconds="1.1s" /> <Nuggets> <WeaponOCLNugget WeaponOCL="OCL_AlienTibHive" /> </Nuggets> </WeaponTemplate> SP code: <SpecialPowerTemplate id="SpecialPower_PlaceSeedDispatch" Flags="NEEDS_OBJECT_FILTER NO_FORBIDDEN_OBJECTS SHARED_SYNC" TargetType="LOCATION" NameOfVoiceNameToUseAsInitiateIntendToDoVoice="VoiceBoobyTrap" WaypointModeTerminal="false" RadiusCursorRadius="20" ForbiddenObjectRange="100"> <!-- or just like this, both are effective <ObjectFilter Rule="ANY" Include="TIBERIUM_FIELD"> </ObjectFilter> --> <ObjectFilter Rule="ANY"> <IncludeThing>TiberiumField</IncludeThing> <IncludeThing>TiberiumFieldBlue</IncludeThing> <IncludeThing>TiberiumFieldRedZone</IncludeThing> </ObjectFilter> <ForbiddenObjectFilter Rule="ANY"> <IncludeThing>AlienTibHive</IncludeThing> <IncludeThing>AlienSporePod</IncludeThing> <IncludeThing>Reaper17GrowthStimulator</IncludeThing> <IncludeThing>Traveler59SporePod</IncludeThing> <IncludeThing>Tiberium</IncludeThing> </ForbiddenObjectFilter> </SpecialPowerTemplate> Just copy ocl TibHive's code from AlienControlCenter can't set the StartAbilityRange and it can active the SP anywhere on the map, I still need Cmdo runs to Tibfield herself and drop the ocl. So how to add an ocl SP on Tibfield to a unit? Share this post Link to post
ztz2019 1 Posted June 18, 2018 1 hour ago, Lauren said: Why is there even a dispatch sp? I just copy Saboteur's code and didn't modify it much. I now use like GDIRifleMan's digin SP(set Options="NEED_TARGET_POS") but still can't ocl on TibField Hole. Share this post Link to post
ztz2019 1 Posted June 21, 2018 I still can't realize the ocl on TibField, so I put on my code to anyone learning to fix it, thanks any how. Please try to realize one unit can build/dig/ocl sth. on TibField, thanks again. Data.7z Share this post Link to post
Egozi44 28 Posted June 21, 2018 (edited) Since Tib field is set to be unattack able and not show HP in the kindof code you need to try some way around it Some random idea that come to my mind: How about you make the commando ability as build tab instead (like how the walls mod can build sub wall from the ability button), and set the vein monster he build to be buildable only on the middle of tib field similar to the Scrin's Growth accelerator? I think that could work Edited June 22, 2018 by Egozi44 Share this post Link to post
ztz2019 1 Posted July 10, 2018 I still can't realize this function, I tried to research TibHive's code, but I could just let ocl suddenly appears on TibField , can't wait until Cmdo approaching to it to build up. It seems I need to explain it more clearly, the function I need is like building a bunker on TibField, it needs unit choose target (to TIbfield) then come up to TibField and begin to build the structure on Tibfield. Share this post Link to post
ztz2019 1 Posted July 11, 2018 Well, I fixed this bug, it's not bug, only give TIbfield's model an OBBox to make it selectable is enough. Share this post Link to post