Jump to content
Sign in to follow this  
ztz2019

How to come true a specialpower to regain health and change weapon?

Recommended Posts

When active the specialpower the unit will regain health and after time runs out it comes normal.

 

At the same time, when in specialpower time the unit will change weapon and then also come back to original.

 

Like the avatar, it has already had 3 weapon, I want to make a specialpower that the avatar will use only leechweapon to hit huge_vehicle unit and original crush small unit. The specialpower has its time so when time runs out it becomes normal beamcannon weapon. And at the same time the specialpower will active avatar autohealbehavior.

 

Once I thought it's just like RA3's japan infantry's Banzai Charge, I checked the code, the weapons are controled by WeaponChoiceCriteria="PREFER_MOST_DAMAGE" , Banzai Charge is powerful than normal rifle and the infantry has only two weapon. But avatar has three weapon and 4 more if I add the leechweapon later; it can't just copy like japan infantry, or no matter when it will just use the most powerful weapon and abandon others.

 

 

Share this post


Link to post

You could/should try to experiment with several attributes of the specialbilityupdate, there are several options in there that can indirectly achieve what you want, the attributemodifier trigger and duration attributes might be able to achieve what you want for example

Share this post


Link to post

You could/should try to experiment with several attributes of the specialbilityupdate, there are several options in there that can indirectly achieve what you want, the attributemodifier trigger and duration attributes might be able to achieve what you want for example

I suppose like this:

 

 

 

1st,let all weapon normal status as Upgrade_Weapon_01, and specialpowerweapon is Upgrade_Weapon_02

                               <WeaponSlotHardpoint
					ID="1"
					AllowInterleavedFiring="true"
					InterleavedStyle="INTERLEAVE_RANDOM">
					<Weapon
						Ordering="PRIMARY_WEAPON"
						Template="NODAvatarLaser"
						Upgrade="Upgrade_Weapon_01"/>
				</WeaponSlotHardpoint>
				<WeaponSlotHardpoint
					ID="3"
					AllowInterleavedFiring="true"
					InterleavedStyle="INTERLEAVE_RANDOM">
					<Weapon
						Ordering="PRIMARY_WEAPON"
						Template="NODObeliskAvatarLaser1"
						Upgrade="Upgrade_Weapon_01"
						ObjectStatus="WEAPON_UPGRADED_02"/>
				</WeaponSlotHardpoint>
				<WeaponSlotHardpoint
					ID="4"
					AllowInterleavedFiring="true"
					InterleavedStyle="INTERLEAVE_RANDOM">
					<Weapon
						Ordering="PRIMARY_WEAPON"
						Template="NODObeliskAvatarLaser2"
						Upgrade="Upgrade_Weapon_01"
						ObjectStatus="WEAPON_UPGRADED_02"/>
				</WeaponSlotHardpoint>
<WeaponSlotHardpoint
ID="7"
AllowInterleavedFiring="true"
InterleavedStyle="INTERLEAVE_RANDOM">
<Weapon
Ordering="TERTIARY_WEAPON"
Template="NODBeamSaber"
Upgrade="Upgrade_Weapon_02"
ObjectStatus="RIDER2"/> ;
</WeaponSlotHardpoint>

 

 

 

 

Then, the 1st specialpower----SpecialPower_RushAttack will give unit an attributemodifier that set status to RIDER2 which let unit won't use the specialweapon in normal

                            <SpecialPower
				id="ModuleTag_RushAttack"
				SpecialPowerTemplate="SpecialPower_PurifierRushAttack"
				UpdateModuleStartsAttack="false"
				AttributeModifier="AttributeModifier_RushAttack" 
				AttributeModifierAffectsSelf="true"
				AttributeModifierRange="1"/>
	<AttributeModifier
		id="AttributeModifier_RushAttack"
		Category="NONE"
		Duration="15s"
		ObjectStatusToSet="RIDER2"
		ModelConditionsSet="USER_8">
	</AttributeModifier>

 

 

 

 

 

And use GiveOrRestoreUpgradeSpecialPower and RemoveUpgradeUpgrade Module to control the upgrade

			 <GiveOrRestoreUpgradeSpecialPower
					id="ModuleTag_Give_Weapon2_SpecialPowerUpdate"
					SpecialPowerTemplate="SpecialPower_RushAttack";1st power
					UpgradeToGive="Upgrade_Weapon_02"/>
			 <GiveOrRestoreUpgradeSpecialPower
					id="ModuleTag_Give_Weapon2_SpecialPowerUpdate"
					SpecialPowerTemplate="SpecialPower_BackNormal";2nd power
					UpgradeToGive="Upgrade_Weapon_01"/>

			<RemoveUpgradeUpgrade
				id="ModuleTag_CommandSet_RemoveFor_01">
				<TriggeredBy>Upgrade_Weapon_01</TriggeredBy>
				<UpgradeToRemove>Upgrade_Weapon_02</UpgradeToRemove>
			</RemoveUpgradeUpgrade>
			<RemoveUpgradeUpgrade
				id="ModuleTag_CommandSet_RemoveFor_02">
				<TriggeredBy>Upgrade_Weapon_02</TriggeredBy>
				<UpgradeToRemove>Upgrade_Weapon_01</UpgradeToRemove>
			</RemoveUpgradeUpgrade>

 

And now the problem is : how to let the 2nd specialpower be automatic actived after 1st specialpower time runs out?

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.

×