ztz2019 1 Posted October 5, 2015 (edited) I tried to simulate Tick Tank's deployed mode and make the digging animation. However, when finishing the animationabout digging and transforming, the model will back to normal, not transformed shape. And the new strengthenAttributeModifierUpgrade be dependent on deployed mode is still effective. So who knows how to correct the animation?And this my code and the whole mod asset <AnimationStateParseCondStateType="PARSE_DEFAULT"><Script>CurDrawableShowSubObject("TREADSStop")CurDrawableHideSubObject("TreadsMove")CurDrawableHideSubObject("TREADSBACK")</Script></AnimationState> <AnimationState ParseCondStateType="PARSE_NORMAL" ConditionsYes="UNPACKING"> <Animation AnimationName="NULightTank_Dig" AnimationMode="ONCE" AnimationSpeedFactorMin="0.4" AnimationSpeedFactorMax="0.4"/> </AnimationState> <AnimationState ParseCondStateType="PARSE_NORMAL" Flags="START_FRAME_LAST" ConditionsYes="PACKING"> <Animation AnimationName="NULightTank_Dig" AnimationMode="ONCE_BACKWARDS" /> </AnimationState> <AnimationState ParseCondStateType="PARSE_NORMAL" Flags="START_FRAME_LAST" ConditionsYes="DEPLOYED"> <Animation AnimationName="NULightTank_Dig" AnimationMode="MANUAL" /> </AnimationState> <SpecialPower id="ModuleTag_GiveUnpackUpgradeSpecialPowerTrigger"SpecialPowerTemplate="SpecialPower_GrantUnpackUpgrade"UpdateModuleStartsAttack="true" SetModelCondition="UNPACKING"SetModelConditionTime="2s"DisableDuringAnimDuration="true" /><GiveOrRestoreUpgradeSpecialPowerid="ModuleTag_GiveUnpackUpgradeSpecialPowerUpdate"SpecialPowerTemplate="SpecialPower_GrantUnpackUpgrade"UpgradeToGive="Upgrade_Weapon_01"PreparationTime="2s"Options="SHOW_PREPARATION_PROGRESS MUST_FINISH_ABILITY" /><SpecialPowerid="ModuleTag_GivePackUpgradeSpecialPowerTrigger"SpecialPowerTemplate="SpecialPower_GrantPackUpgrade"UpdateModuleStartsAttack="true" SetModelCondition="PACKING"SetModelConditionTime="2s"DisableDuringAnimDuration="true" /><GiveOrRestoreUpgradeSpecialPowerid="ModuleTag_GivePackUpgradeSpecialPowerUpdate"SpecialPowerTemplate="SpecialPower_GrantPackUpgrade"UpgradeToGive="Upgrade_Weapon_02"PreparationTime="2s"Options="SHOW_PREPARATION_PROGRESS MUST_FINISH_ABILITY" /><GrantUpgradeCreateid="ModuleTag_Add1"UpgradeToGrant="Upgrade_Weapon_02" /><LocomotorSetUpgrade id="ModuleTag_AttributeModifierDeployed2"><TriggeredBy>Upgrade_Weapon_01</TriggeredBy></LocomotorSetUpgrade> <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> This is the URL about mod assetsharesend.com/oec0rehtor the HaveTry.txt, change .txt to .rar or .zip,no virus and please reassure HaveTry.txt Edited October 8, 2015 by ztz2019 Share this post Link to post
Ravendark 46 Posted October 5, 2015 If i read your model and animatiosstates correctly, you basicly tell it to be DEPLOYED = your "transformation" aka where it is burrowed into the ground. But you don't tell it anywhere how it gets to that condition. You do tell to enter packing and unpacking but no where do you tell it to stay in the DEPLOYED model/animationstate. If you want to do the deploying thing with upgrades, you could just do a upgrade SP into USER_30 or any unused USER_x modelconditionstate. like: <ModelConditionUpgrade id="ModuleTag_Deployintoground" AddConditionFlags="USER_30"> <TriggeredBy>Upgrade_Deployintoground</TriggeredBy> </ModelConditionUpgrade> <ModelConditionUpgrade id="ModuleTag_Deployoutoftheground" RemoveConditionFlags="USER_30"> <TriggeredBy>Upgrade_Deployoutoftheground</TriggeredBy> </ModelConditionUpgrade> <!-- you will need somekind of remove/kill upgrade system if you are relying on upgrades --> <RemoveUpgradeUpgrade id="ModuleTag_Remove_01"> <TriggeredBy>Upgrade_Deployoutoftheground</TriggeredBy> <UpgradeToRemove>Upgrade_Deployintoground</UpgradeToRemove> </RemoveUpgradeUpgrade> <RemoveUpgradeUpgrade id="ModuleTag_Remove_02"> <TriggeredBy>Upgrade_Deployintoground</TriggeredBy> <UpgradeToRemove>Upgrade_Deployoutoftheground</UpgradeToRemove> </RemoveUpgradeUpgrade> you can trigger those upgrades with a SP or just a commandsetbutton. Besides that, you use transitionstates from default into USER_30 and from USER_30 into default. you wont even need pack/unpack. or you could use that nod shadow fly/land system to do the deploying. <SpecialPower id="ModuleTag_DeployToGroundSP" SpecialPowerTemplate="SpecialPower_DeployToGround" UpdateModuleStartsAttack="true" /> <SwitchLocomotorsSpecialAbilityUpdate id="ModuleTag_DeployToGroundSPUpdate" SpecialPowerTemplate="SpecialPower_DeployToGround" UnpackTime="0.57s" BusyForDuration="1s" UseUpgradedLocomotor="true" /** this can be set to false maybe, or just use a fake locomotor **/ TriggersFlight="false" Options="IGNORE_FACING_CHECK" SetObjectStatusOnTrigger="IMMOBILE" /> /** so it cant move while deployed **/ <SpecialPower id="ModuleTag_DeployToTankSP" SpecialPowerTemplate="SpecialPower_DeployToTank" UpdateModuleStartsAttack="true" /> <SwitchLocomotorsSpecialAbilityUpdate id="ModuleTag_DeployToTankSPUpdate" SpecialPowerTemplate="SpecialPower_DeployToTank" UnpackTime="0s" BusyForDuration="1.0s" StartAbilityRange="30.0" LandingRange="320" UseUpgradedLocomotor="false" TriggersLanding="false" Options="IGNORE_FACING_CHECK MUST_FINISH_ABILITY" ClearObjectStatusOnExit="IMMOBILE" /> /** so it can move again **/ you can use the same specialpowers to trigger upgrades (remember to remove them aswell if you toggle modes). Removing/killing upgrades with the RemoveUpgradeUpgrade module might also solve your atributemodifier problem. i would try these and see what works. Share this post Link to post
ztz2019 1 Posted October 8, 2015 (edited) I really have had the "removeupgradeupgrade" in the origin code, but it didn't work. Edited October 8, 2015 by ztz2019 Share this post Link to post
Lauren 78 Posted October 8, 2015 Seriously if you guys want to post longer snippets of code please use pastebin.com Share this post Link to post
ztz2019 1 Posted October 8, 2015 (edited) Seriously if you guys want to post longer snippets of code please use pastebin.com Well, have you got an idea to fold the code? I see it's too long to scan quickly? My IP can't visit the site. And do you know how to fix my error? When the unpacking animation over, the unit back to parse_default. Because once I tried to make parse_default model is the last frame of the diggin anim, so the tank keep deployed state when idle, and after unpacking is over, the unit do the deploying animation again. I want: normal(default state)->deploying(unpacking)->deployed state(after unpacking) now the error: normal(default state)->deploying(unpacking)->normal(after unpacking) Edited October 8, 2015 by ztz2019 Share this post Link to post
ztz2019 1 Posted October 8, 2015 (edited) you can use the same specialpowers to trigger upgrades (remember to remove them aswell if you toggle modes). Removing/killing upgrades with the RemoveUpgradeUpgrade module might also solve your atributemodifier problem. i would try these and see what works. I want: normal(parse_default)->deploying anim(unpacking)->deployed state(after unpacking) now the error is: normal(parse_default)->deploying anim(unpacking)->normal(after unpacking) When the unpacking animation is over, the tank back to parse_default, not other state. Because once I tried to make parse_default model animation is the last frame of the diggin anim, so the tank keep deployed state when idle, and after unpacking is over, the unit do the deploying animation again. 【just like this: deployed state(default state/ parse_default)->deploying anim(unpacking)->deployed state(after unpacking)】 Edited October 8, 2015 by ztz2019 Share this post Link to post
Stygs 25 Posted October 8, 2015 Ravendark allready pointed out what your mistake is: Your using the DEPLOYED modelcondition but there is nothing to trigger it. So either use a spcialpower to set it or trigger it with an upgrade. Share this post Link to post
ztz2019 1 Posted October 9, 2015 Well, after add ModelConditionUpgrade module it works. Thanx, Ravendark. And I'd like to use LocomotorSetUpgrade rather than SwitchLocomotorsSpecialAbilityUpdate. Maybe I'm in wrong way(like too ahead of other module),if adding SwitchLocomotorsSpecialAbilityUpdate it causes same bug as before, and can't recognize the AttributeModifierUpgrade which triggered by upgrade_unpack, but LocomotorSetUpgrade could work stable. Share this post Link to post