Jump to content
Sign in to follow this  
ztz2019

How to add ocl on Tibfield?

Recommended Posts

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

Why is there even a dispatch sp?

Share this post


Link to post
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

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

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 by Egozi44

Share this post


Link to post

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×